2017-08-03 47 views
0

我有一個帶有圓角邊框的引導按鈕。我想讓邊框圓角內的按鈕的內部部分不是矩形。要在按鈕的內邊緣有圓角

這是我的Fiddle。基本上我想要內部邊框與外部黑色邊框而不是矩形相似。

HTML:

<button type="button" class="btn btn-primary btn-lg btn-block">Block level button</button> 

CSS:

.btn-primary, .btn-primary:hover, .btn-primary:active, .btn-primary:visited 
{ 
background-color: #00A0AF !important; 
background: linear-gradient(#00A0AF, #00ffff); 
} 
.btn-primary { 
border: 5px solid #000000; 
color: #000000; 
} 
+0

橢圓你的意思是圓角嗎? –

+0

@ G.Hunt是圓角是合適的。我想要黑色邊框的內邊框上的圓角,就像外邊框一樣。相應地編輯了我的問題。 –

+1

有趣的是,如果你的黑色邊框消失在這裏的''''''片段中,除非我添加!對邊界很重要...... – mplungjan

回答

2

的CSS border-radius屬性是你想要的。

border-radius: 10px;添加到.btn-primary類將做到這一點。

演示here

+1

我很好奇爲什麼黑色邊框不會出現在片段中的SO中,除非我添加!important:'.btn-primary {0} {0} {0} {0}固體#000000!重要; color:#000000; border-radius:10px!important; }' – mplungjan