Home  >  Article  >  Web Front-end  >  Please give me a favor_html/css_WEB-ITnose

Please give me a favor_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:09:01876browse

How to make the image enlarge when the mouse is hovering.


Reply to discussion (solution)

<img id='image' src='http://avatar.profile.csdn.net/C/D/B/2_woshior198.jpg' width='100'/><script>var img = document.getElementById('image');img.onmouseover = function(){this.width='200'}img.onmouseout = function(){this.width='100'}</script>

HTML code

2627ee369a232c3fe19915d5df86c64d
3f1c4e4b6b16bbbd69b2ee476dc4f83a
var img = document. getElementById('image');
img.onmouseover = function(){this.width='...

HTML code
02dc543333e8a3269a2665fb6267de9f
3f1c4e4b6b16bbbd69b2ee476dc4f83a
var img = document.getElementById('image' );
img.onmouseover = function(){this.width='200'...
Will the image be distorted by doing this? !

Quoting the reply from aspwebchh on the 1st floor:

HTML code
b5c60cd51b7783a09cdb6dfc9da62b5b
3f1c4e4b6b16bbbd69b2ee476dc4f83a
var img = document.getElementById('image');
img.onmouseover =……
like this Will the pictures be distorted? !

Then change the picture~~~

Quoting the reply from aspwebchh on the 1st floor:

HTML code
42eded1f3a1a99f10212c6f4599f381c
3f1c4e4b6b16bbbd69b2ee476dc4f83a
var img = document.getElementById( 'image');
img.onmouseover =...
You should design two pictures, one larger and one smaller, so that's ok

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn