1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > html让a标签左右一样宽 button和a标签设置相同的css样式 但是宽度不同

html让a标签左右一样宽 button和a标签设置相同的css样式 但是宽度不同

时间:2019-01-24 13:08:48

相关推荐

html让a标签左右一样宽 button和a标签设置相同的css样式 但是宽度不同

登录

注册

.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里好像是可以做到一致的,怎么做到的呢?

我查到好像是浏览器有什么默认样式,怎么能解决这个问题呢?

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。