這是我的代碼,它完全適用於所有,但ie!主動根本不火CSS - 圖像精靈:主動不工作,即
a.Button span {
background: transparent url('images/form_sprite.png') no-repeat 0 0;
display: block;
height:45px;
line-height: 30px;
padding: 7px 0 5px 20px;
color: #fff;
background-position: 0 -44px;
}
a.Button {
background: transparent url('images/form_sprite.png') no-repeat top right;
display: block;
float: left;
height: 45px;
margin-right: 6px;
padding-right: 27px;
text-decoration: none;
font-family: Arial, Helvetica, sans-serif;
font-size:12px;
font-weight:bold;
}
a.Button:hover span {
background-position: 0 -136px;
}
a.Button:hover {
background-position: right -90px;
}
a.Button:active span {
background-position: 0 -225px;
}
a.Button:active {
background-position: right -181px;
}
這是HTML:
<div class="clearbutton"> <a class="Button" href="#"><span>Button text</span></a> </div>
任何想法嗎?
哪個版本的IE? 6 - 7 - 8 - 9? – TH1981 2011-12-31 18:20:40
所有版本@Aninemity – 2011-12-31 18:36:14
如果你添加了另一個效果:active,如顏色變化,它在IE中觸發嗎? – TH1981 2011-12-31 18:53:13