如果根本没有必要,为什么Bootstrap使用垂直对齐和文本中心?

时间:2017-06-06 19:31:41

标签: html css twitter-bootstrap-3

如果没有必要,为什么bootstrap会在按钮组件中使用vertical-align: middletext-align: center

e.g:

display: inline-block;
font-weight: 400;
line-height: 1.25;
text-align: center;
white-space: nowrap;
vertical-align: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
border: 1px solid transparent;
padding: .5rem 1rem;
font-size: 1rem;
border-radius: .25rem;
-webkit-transition: all .2s ease-in-out;
-o-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;

同样:

display: inline-block;
font-weight: 400;
line-height: 1.25;
white-space: nowrap;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
border: 1px solid transparent;
padding: .5rem 1rem;
font-size: 1rem;
border-radius: .25rem;
-webkit-transition: all .2s ease-in-out;
-o-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;

据我了解,文本居中的属性是padding

谢谢。

0 个答案:

没有答案