hi, how can i disable image save on my searchbox button, and not only my searchbox i have alot of button have same issue.
<button>
<img src="https://i.imgur.com/BX74tjG.png" width="18.1" height="18.1" >
</button>
hi, how can i disable image save on my searchbox button, and not only my searchbox i have alot of button have same issue.
<button>
<img src="https://i.imgur.com/BX74tjG.png" width="18.1" height="18.1" >
</button>
The only way I can think of is to instead of using img HTML element to render an image, you can display image using CSS property
background-image: url("./image.png");
.
Edit: I made a simple example:
https://codepen.io/michal9909/pen/XegEmZ
Although I don’t see why you want to remove it.
wow thank you so much it worked
finally got my answer!
You can use the pointer-events
property on the image and set its value to none
. This will tell the browser to ignore any mouse events, including mouseover (hover) and click (no matter what type of click).
and here is a wonderful article about the pointer-events
property from the CoDrops CSS Reference.