我正在尝试删除HTML Button元素上的所有效果.HTML:
<div id="go">
<button onclick="load.update(true,cards.id);" type="submit"></button>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS:
#header #go button{
display:block;
border:0 none;
cursor:pointer;
outline:none;
vertical-align:top;
width:18px;
height:33px;
background:url('../images/cards/go.png'); //Just an image to replace it all.
}
Run Code Online (Sandbox Code Playgroud)
在Chrome和Firefox中,这样可以正常工作,但在IE(至少8个)中,当按下按钮时按钮的"推动"效果仍然存在(EG偏移)是否有任何技巧我可以用来消除这种效果?提前致谢!Diesal.
我想设置:active由<a>标签表示的按钮的状态.该<a>标签具有内<span>(怎么一回事,因为我要添加到该按钮的图标).
我注意到:active除了Internet Explorer 8之外的所有内容都正确触发了状态.在IE 8中,看起来<span>(<a>填充)周围的区域触发了:active状态,但是当直接点击其中的文本时<span>,:active状态不会被触发.
有没有办法解决这个问题而不诉诸Javascript?
<a class="button" href="#">
<span>Add a link</span>
</a>
Run Code Online (Sandbox Code Playgroud)
a.button { some styles }
a.button:active { some other styles }
Run Code Online (Sandbox Code Playgroud)