我創建了一個使用css僞類的鏈接。正如在CSS中看到的(:之前)。在Andriod設備中一切都很好,但在iPhone中,它正在進行第二次點擊Why ...?如果有任何解決方案,請幫助我。鏈接無法在iPhone中進行第一次點擊
.link{float:left;}
.link a {
color: #000;
font-size: 15px;
font-weight: 400;
padding: 10px;
display: inline-block;
border: 1px solid #b6fe54;
-webkit-transition: all .5s ease-in-out;
-moz-transition: all .5s ease-in-out;
-o-transition: all .5s ease-in-out;
transition: all .5s ease-in-out;
position: relative;
}
.link a:before {
position: absolute;
content: "";
width: 0px;
background: #b6fe54;
left: 0px;
top: 0px;
height: 100%;
z-index: -1;
-webkit-transition: all .5s ease-in-out;
-moz-transition: all .5s ease-in-out;
-o-transition: all .5s ease-in-out;
transition: all .5s ease-in-out;
}
.link a:hover:before {
width: 100%;
}
<div class="link"><a href="https://www.google.co.in" target="_blank">Learn More</a></div>
工作的呢? https://jsfiddle.net/xoe3cwgd/ –