Disable the text-highlighting magnifier on touch-hold on Mobile Safari / Webkit

后端 未结 6 2111
无人共我
无人共我 2020-12-08 09:07

I have some elements in my iPhone website that don\'t have any text in them but require the user to click and hold on them (DIVs). This causes the text-highlighting/editing

6条回答
  •  旧巷少年郎
    2020-12-08 09:53

    This is also useful in protecting content that you don't want copied or saved, such as an image:

    #yourdiv img {-webkit-touch-callout: none; }
    

提交回复
热议问题