html - CSS A::after 链接在 Safari 上不起作用

标签 html css safari

我使用 CSS a::after 生成一个按钮 在所有浏览器中,按钮都可以 在所有浏览器中链接都可以,除了 Safari

在其他浏览器中一切正常,但在 Safari 中生成了按钮但无法点击它,没有光标指针并且无法点击 safari。

有什么想法吗? 这是代码,你可以在 fiddle 上测试它 http://jsfiddle.net/ddDa4/

<a href="http://google.com">google.com</a>


a::before {

    content: "» Details";
    float: right;
    font-family: verdana;
    font-size: 13px;
    font-weight: bold;
    line-height: 1.12em;
    color: white !important;
    background-color: #7CCA0D;
    padding: 7px 10px 9px;
    border-radius: 5px;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    -khtml-border-radius: 5px;
    margin-top: -2px;

}

谢谢

最佳答案

position:relative 解决了你的问题

a::before {
    position:relative;
    content: "» Details";
    float: right;
    font-family: verdana;
    font-size: 13px;
    font-weight: bold;
    line-height: 1.12em;
    color: white !important;
    background-color: #7CCA0D;
    padding: 7px 10px 9px;
    border-radius: 5px;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    -khtml-border-radius: 5px;
    margin-top: -2px;
}

关于html - CSS A::after 链接在 Safari 上不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20097881/

相关文章:

html - 仅限 iPad 的横向 safari 媒体查询

javascript - CSS 只绘制左边框和上边框,忽略右边框和下边框

javascript - 如何让我的溢出div始终滚动到底部?

javascript - Chrome - "width: 0px"问题

javascript - 如何让我的矩形在 HTML 中消失

html - 过渡适用于 Chrome 和 Firefox,不适用于 Safari

html - "linear-gradient"在 IE9 和 Safari 中不工作

javascript - jQuery 此选择器不适用于图像

javascript - 如何在 onchange 事件期间访问选择框中的数据值

css - Jquery Mobile - 显示带有气泡计数的图标