css - how to disable dragging of an html element (especially "img")? -


i have image don't want drag-able or selectable no drag other places on page. how done?

it impossible prevent store image (or other resources) on computer others have mentioned.

but trick make harder (impossible inexperienced people guess) use css , background images:

<div style='background: url("myimage.gif");'></div> 

the image on background of <div> block , cannot dragged or right clicked in order save it.

using coding knowledge possible ind out myimage.gif part, can added after base url in order download image , save it. example if html page @ http://www.example.com/mypage.html image found @ http://www.example.com/myimage.gif

as mentioned still possible save image, inexperienced people lot harder.

note: in example image put in html tag, proper use of css file, harder find inexperienced people.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -