我使用 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/