html垂直边距,html – Styling Bootstrap的btn-group-justified,添加边距和垂直尺寸
HTML
Option 1
Option 2
Option 3
CSS
.blocks .btn-primary
{
padding: 24px 12px;
margin: 0 5px;
border-radius: 0;
}
將看起來像:
If I apply btn-group-justified class instead of just btn-group,they
became justified but still not square-shaped,nor they have margin
between them
我不認為btn組合理的類將意圖使用沒有btn組.雖然在不使用btn-group時似乎并沒有什么不同.
現在你有html:
Option 1
Option 2
Option 3
CSS:
.blocks .btn-primary
{
padding: 24px 12px;
border-radius: 0;
}
.blocks {border-spacing:5px;}
這將是:
請注意,您有矩形而不是正方形. btn-group-justified將該組的總數設置為其父級的100%.要制作正方形,您需要使用jQuery來根據按鈕的(內部)寬度設置高度. (見:CSS scale height to match width – possibly with a formfactor)
$(".btn-group-justified.blocks .btn").height($(".btn-group-justified.blocks .btn").innerWidth());
$(window).resize(function(){ $(".btn-group-justified.blocks .btn").height($(".btn-group-justified.blocks .btn").innerWidth()); });
總結
以上是生活随笔為你收集整理的html垂直边距,html – Styling Bootstrap的btn-group-justified,添加边距和垂直尺寸的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 用android制作一个记事本app_用
- 下一篇: 约翰诺曼超级计算机研究中心,第433章