Clickable website image not working on iphone and android devices

后端 未结 1 1129
暗喜
暗喜 2021-01-23 06:08

I use the platform virb.com for my website and am having issues with getting my clickable images to work on iPhone and Android mobile devices. Some links work at times and then

1条回答
  •  旧时难觅i
    2021-01-23 06:33

    Mobile Safari passes touch events through for things that are obviously touchable like links or buttons. However, if you are using Javascript to add touch events to other html elements like an or

    tag you can let Safari know it's touchable by setting style:

    cursor:pointer;
    

    either on the element or in a css class on the element.

    If you can add a css class to one of your files, you could do something like this in the head section:

    
    
     // Then put the class on the element you want to be clickable
     
    some other html

    If you can't edit the css you can put the style directly on the element like so

     
    

    0 讨论(0)
提交回复
热议问题