Preventing an image from being draggable or selectable without using JS

前端 未结 8 2111
忘了有多久
忘了有多久 2020-12-04 05:28

Does anyone know of a way to make an image not draggable and not selectable -- at the same time -- in Firefox, without resorting to Javascript? Seems trivial, but here\'s th

8条回答
  •  庸人自扰
    2020-12-04 05:43

    I created a div element which has the same size as the image and is positioned on top of the image. Then, the mouse events do not go to the image element.

提交回复
热议问题