登录
.btn {
display: block;
-moz-appearance: none;
background: rgba(0, 0, 0, 0) none repeat scroll 0 0;
border-radius: 0.25rem;
box-sizing: border-box;
cursor: pointer;
font-family: inherit;
font-size: 0.8rem;
height: 2rem;
line-height: 1.9rem;
margin: 0;
padding: 0 0.5rem;
position: relative;
text-align: center;
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
border: 1px solid #f90;
margin: 0.5em;
-webkit-user-select: none;
-moz-user-select: none;
-moz-transition-duration: 300ms;
-webkit-transition-duration: 300ms;
transition-duration: 300ms;
-webkit-transition-property: background-color;
transition-property: background-color;
}
这两个元素都使用这个样式,为什么宽度却不一样,bootstrap里好像是可以做到一致的,怎么做到的呢?
我查到好像是浏览器有什么默认样式,怎么能解决这个问题呢?