Issue
I'm trying to style a hyperlink's state when it's tapped on a mobile device. Basically it has to flicker a green color right after being tapped. I've tried all the CSS pseudoclasses for hyperlink states, including:
a:active
a:hover
a:focus
But on my iPhone, the hyperlink doesn't show the intended style when tapped. Is there a better way through CSS or jQuery to accomplish this?
Solution
You might need to use a hack along with :active
Try adding this event handler to the <body>
tag:
<body ontouchstart="">
Answered By - cssyphus
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.