html - CSS :active not working (IE 10)

标签 html css internet-explorer-10 transformation

每当我尝试通过在元素中嵌套元素来创建 3D 按钮时...我在 Google 和 Firefox 中都没有问题...但是在 IE10 中...似乎 .parent:active 和它是 children ……

像这样:

<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 fiddle : http://jsfiddle.net/H75jN/

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

我定位错类了吗?

最佳答案

替换<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 fiddle : http://jsfiddle.net/D8nJ6/1/

砰!

在 IE9 中,圆 Angular 边框仍然存在问题,但这与 Rounded-Border + Background-Gradient 组合有关。仍在寻找解决方法。

关于html - CSS :active not working (IE 10),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18005982/

相关文章:

css - IE10悬停+伪元素

html - 提高 KineticJS 性能的最佳方法是什么,尤其是在移动设备上?

javascript - 根据内容动态调整 HTML 文本输入宽度

javascript - jquery 在其容器的右上角放置一个工具提示

javascript - 在php中生成的动态表中更改td的颜色

javascript - 对于某些情况,如 Internet Explorer 特定的 CSS 或 Internet Explorer 特定的 JavaScript 代码,如何仅针对 Internet Explorer 10?

javascript - WordPress 主题 : JavaScript not working

javascript - 根据时间值更改文本颜色php

javascript - 从单选按钮 slider 的纯 CSS 实现创建 JS 事件

css - 即使滚动 ="yes"和溢出 : scroll,IE 10 也不会在 iframe 上显示滚动条