css - Weird image moving on html site -
I am creating a web site and suddenly I ran into a problem. It is not very big, but I would like to fix it. I have many images on my site but there is a mess that the images are "dragable" I mean, when you click on an image and dragging the image instead of moving your mouse. How can this be fixed?
It is always the case that nothing seems strange in it.
Still, this link can help you:
You can use javascript to avoid drawing a picture: < P> html file:
& lt ;! - Correct image (dragging disabled) - & gt; & Lt; Img src = "image.png" onmousedown = "if (event.preventDefault) event.preventDefault ()" & gt; javascript:
// Anonymous event with online event window.onload = function (e) {var evt = e || Window.event, // defined events (cross-browser) imgs, // images collection i; // Used in local loop // If preventDefault is present, then define the onmousedown event handler if (evt.preventDefault) {// Gather all the images on the page imgs = document.getElementsByTagName ('img'); Loop through faked images for // (i = 0; i & lt; imgs.length; i ++) {//; And the Onomosden Event Handler defines the image [i]. }}}; // Disable disable image dragging (e) {e.preventDefault (); }
Comments
Post a Comment