2013-08-01 74 views
1

每当我尝试通过在元素中嵌套元素来创建3D按钮...我在Google和Firefox中没有问题...但是在IE10中......似乎有一个它的孩子......CSS:active not working(IE 10)

事情是这样的积极:

<ul class="checkout"> 
    <li id="creditcard"> 
     <a href="#" class="a-btn"> 
      <span class="a-btn-left">Proceed to Checkout</span> 
      <span class="a-btn-slide"><img class="slide-icons" src="icons.png" /></span> 
      <span class="a-btn-right"> 
       <span class="arrow"></span> 
       <span class="cards"></span> 
      </span> 
     </a> 
    </li> 
</ul> 

这里是一个JS小提琴:在.parent脱节http://jsfiddle.net/H75jN/

所有变换的IE10工作...这让我更加困惑,为什么:active函数不起作用。

我的目标是错误的类吗?

回答

1

更换<a><button>

添加额外的CSS:

padding:0 0 5px 0; /* This is necessary for the Box shadow to work in Chrome */ 
border:0; 
outline:0; 
overflow:visible; /* Necessary for any images to overflow past button edges */ 
cursor:pointer; 
background:none; /* This eliminates grey background in FF and IE */ 
box-sizing:content-box; /* By default, Chrome BUTTONS are border-box, this fixes it */ 

完成!

JS小提琴:http://jsfiddle.net/D8nJ6/1/

BAM!

在IE9中,圆角边框仍然存在问题,但它与圆角边框+背景渐变组合有关。仍在寻找修复。

+0

修复了IE9中的圆角/背景渐变问题 – vitaly87