我遇到了几个与我的背景没有显示的按钮元素有关的问题。Internet Explorer问题和背景未显示
这里是我的CSS代码:
button.button-master-lite, a.button-master-lite {
background: #92AE41;
background: -moz-linear-gradient(top, #89A73E 0%, #92AE41 100%);
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#89A73E), to(#92AE41));
border: 1px solid #89A73E;
border-bottom: 1px solid #92AE41;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
-moz-box-shadow: inset 0 1px 0 0 #92AE41;
-webkit-box-shadow: inset 0 1px 0 0 #92AE41;
box-shadow: inset 0 1px 0 0 #92AE41;
color: #fff;
font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
font-size: 11px;
font-weight: bold;
line-height: 1;
padding: 5px 8px 6px 8px;
text-align: center;
text-shadow: 0 -1px 0 #5D862F;
width: auto;
}
这是我的HTML:
<a class="button-master-lite" href="#">Order Now</a>
与IE 6和IE 7中的背景颜色不显示。但是,当我除掉第一个背景声明后,背景显示。
我有这个按钮的HTML页面上有一些div和子divs与浮动和位置样式元素,但我不明白哪一个是造成问题。我试着把代码放在一个完全空白的页面上,只有我的样式表,它工作正常。
有什么特别的东西会导致背景不显示,当我有其他浏览器的其他背景声明?它与浮标或其他定位元素有什么关系?
我希望得到一些帮助。谢谢。
对于它的价值,你可以结合你的字体家庭,字体大小,字体重量和行高规则转换为[单个声明]:'font:bold 11px/font-weight, 1“Lucida Grande”,“Lucida Sans Unicode”,“Lucida Sans”,日内瓦,Verdana,sans-serif;' – sdleihssirhc 2011-05-20 18:29:54