만들겠습니다 BS3 라운드된 단추 (어 퍼펙트 서클), 한 번의 폰타바섬 (4.0) 의 아이콘 센터.
지금까지 나는 다음 코드:
HTML:
<a href="#" class="btn btn-default"><i class="fa fa-user"></i></a>
무엇을 할 수 있는 CSS 수정표시 이 버튼를 어 퍼펙트 서클?
뭔가 추가에는 클래스 등 국경 반지름입니다 추가할 수 있습니다.
HTML:
<a href="#" class="btn btn-default btn-circle"><i class="fa fa-user"></i></a>
CSS.
.btn-circle {
width: 30px;
height: 30px;
text-align: center;
padding: 6px 0;
font-size: 12px;
line-height: 1.42;
border-radius: 15px;
}
글꼴 크기를 변경할 필요가 있는 경우 또는 패딩 이에 따라 치수입니다 변경하십시오 했다.
http://bootsnipp.com/snippets/featured/circle-button > <;?
CSS.
.btn-circle { width: 30px; height: 30px; text-align: center;padding: 6px 0;font-size: 12px;line-height: 1.428571429;border-radius: 15px;}.btn-circle.btn-lg {width: 50px;height: 50px;padding: 10px 16px;font-size: 18px;line-height:1.33;border-radius: 25px;}
이러한 파일을 다운로드할 경우, 다음과 같은 클래스에 추가한 국경 반지름입니다 bootstrap-social.css 로칼에서 어졌다면 변경할 수 있습니다. 50%,
.btn-social-icon.btn-lg{height:45px;width:45px;
padding-left:0;padding-right:0; border-radius: 50%; }
Html 은 teh avamar
<a class="btn btn-social-icon btn-lg btn-twitter" >
<i class="fa fa-twitter"></i>
</a>
<a class=" btn btn-social-icon btn-lg btn-facebook">
<i class="fa fa-facebook sbg-facebook"></i>
</a>
<a class="btn btn-social-icon btn-lg btn-google-plus">
<i class="fa fa-google-plus"></i>
</a>
작동하잖아 준대칭 for me.
멋진 글꼴색 사용하여 스택된 꾩씠肄 (대안을 부트스트랩에 배지). 다음은 더 (예: http://fontawesome.io/examples/
<! - begin 스니핏: js 숨기십시오: 거짓값 콘솔: 진정한 바벨. > 거짓값 -;
<! - 언어: > html 로 -; type = " button" 버튼를 <;; (클릭) = " " 도주메트링 ();; class = " 위에 색상 초점 없이 국경 없는 fa 스택할 fa-lg" >;; class = " fa-stack-2x";;;; 난 < 색상 초점 fa fa 원 (circle) > < /i>. class = ", 흰색,, /span> 1< > fa-stack-1x" 스팬할 <. < /button>; 링크 href = " https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" <;; rel = " stylesheet" />;;
.no-border {
border: none;
background-color: white;
outline: none;
cursor: pointer;
}
.color-no-focus {
color: grey;
}
.hover:hover {
color: blue;
}
.white {
color: white;
}
끝 - < 스니핏 >;!
가장 좋은 방법은 '추가 국경 믿지아니하며 버튼를 라운드된 추가하려면 국경 반지름입니다' 재산이잖아 이 클래스는 보라 내가 더 크기 때문에 언제든지 버튼를 이 추가 수 있습니다. 높이와 위다트 설정할 경우, rouding" " 작성해야 합니다. 각 클래스 버튼를 크기.
<! - begin 스니핏: js 숨기십시오: 거짓값 콘솔: 진정한 바벨. > 거짓값 -;
.btn-circle {
border-radius: 50%;
}
<button class='btn-circle'>Click Me!</button>
<button class='btn-circle'>?</button>
끝 - < 스니핏 >;!