Let's say i have this html structure:
<div className="big-square">
<div className="small-button">button</div>
</div>
I need to show the button on .big-square:hover
. It's simple, but what about touch devices? If i'll use simply .big-square:hover
css rule, then if user will accidentally click at the location of button, then button will appear and will be clicked instantly. I want to avoid this situation. I've tried to use misc transition delays, but this doesn't work.
Here an example, to make it easier to understand and answer:
https://jsfiddle.net/hznjb8ur/
Jquery is there for sake of simplicity. I would like to avoid using jquery and even js for this case, because i have dozens and hundreds elements like that on a single page, so i'd prefer to solve this with simple css trick.