2022年7月20日星期三

[fix] iOS browser css :active pseudo styles

iOS is a bit strange on that. You can use ontouchstart as follows:

<button class="button" ontouchstart>test</button>

Or the pseudo :target (works for <a> tags)

.button:target { 
     background-color: red; box-shadow: 0 5px #666; transform: 
     translateY(4px); 
 }

沒有留言:

發佈留言

image img vertical text align center

  < div > < img style = "vertical-align:middle" src = "https://via.placeholder.com/60x60" alt = "A gr...