【发布时间】:2015-07-02 19:13:12
【问题描述】:
我遇到了 IE9 和 css 的问题。看起来 IE9 不接受两个元素 p 和 a 的填充定义。背景颜色缩小并且仅在元素的左上角。以下 css 在 Firefox 中运行良好:
<div class="slider">
<p class="claim orange">Some Text</p>
<a class="claim blue" href="">Some Link</a>
</div>
<style type="text/css">
.slider p {
position: absolute;
top: -200px;
z-index: 8000;
padding: 0.5% 2%;
line-height: 100%;
color: #fff;
white-space: nowrap;
text-transform: uppercase;
}
.claim {
line-height: 100%;
font-size: 18px;
}
.orange { background: #EF7D00 }
.blue {
color: white;
font-weight: bold;
padding: 10px 15px;
border-color: white;
}
.blue:hover {
color: white;
font-weight: bold;
padding: 10px 15px;
background: #2e6da4;
border-color: #2e6da4;
text-decoration: none;
}
</style>
可能是什么问题,在这种情况下,如何让背景颜色在 IE9 中正常工作?
【问题讨论】:
标签: css firefox internet-explorer-9 background-color