IE8为什么样式改变了?应该没有不支持的属性吧,IE8接触的较少,很尴尬
html
<button class="dropdown-btn">
默认
<a>
<i class="iconfont icon-expandmore"></i>
</a>
</button>
css
.dropdown-btn {
height: 30px;
border: 1px solid #E1E6EB;
line-height: 30px;
padding-left: 14px;
box-sizing: content-box;
background-color: #FAFAFA;
}
.dropdown-btn a {
width: 30px;
height: 30px;
display: block;
float: right;
border-left: 1px solid #E1E6EB;
margin-left: 14px;
background: #FFF;
text-align: center;
}
.dropdown-btn a i {
line-height: 30px;
color: #24AC7E;
display: block;
text-align: center;
}
原因是, IE 8 下面, button里面嵌套 a 标签出了问题。
你试试加上-ms-box-sizing呢?