简体   繁体   中英

How to make hover or click on content in a circular image and display on mobile devices

I have a circular image: 在此处输入图片说明 What I want to do is as a mouse hovers (or clicking) over the various color boxes, have text/content displayed in the middle and to the right of it. The catch is how can I make this also display as intended on a mobile device?

Any pointers/examples to get me started is immensely helpful, thanks!

The hover function doesn't apply for mobile devices, as far as I know. What I mean by this is that you can not hover on a mobile device in order to see the effect happening.

If you want different parts to be clickable/hoverable, you can do this with coordinates or area/similar tags.

The :hover state is unsupported (for the most part, as it is called when the element is clicked) on mobile devices, so you would probably want to call this on click events instead.

Further reading on <area>

Getting click coordinates with jQuery

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM