html - Changing image size during mouse hover -


I am currently trying to create it so that if I measure it by li . I look like more than img that changes with an image that managed to exclude a code from a website:

  
div class = "Profile" & gt; & Lt; Ul & gt; & Lt; Li class = "portrait lift" id = "one" align = "left" & gt; & Lt; A href = "../ project / profile1.html" & gt; & Lt; Img src = "../ project / image / portrait / img 1. jpg" width = "100" onosovar = "this.width = 150;" Onmouseout = "this.width = 100" align = "middle" alt = "img1" /> & Lt; / A & gt; Character 1 & lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt;

What I do not understand is pointing to this . I think it points to img but it does not seem to work, how should I change the code when I type li or a < / Code> instead of this can resize the image on hover? Thanks in advance.

There is no need for CSS in this case (though it is cleaner). You can do this by using a name attribute

  & lt; Img src = "https://upload.wikimedia.org/wikipedia/commons/6/6f/OrteliusWorldMap.jpeg" width = "150" height = "100" name = "ortelius worldmap" onmosovar = "aerialus worldmap.Wide = '300'; Aurelius WorldMap. Height = '200'; " Onmouseout = "OrteliusWorldMap.width = '150'; OrteliusWorldMap.height = '100', '/' & gt;  

Edit:

Now you can change it anywhere, thanks to the name feature.

  & lt; Div class = "profile" & gt; & Lt; Ul & gt; & Lt; Li class = "portrait lift" id = "one" align = "left" & gt; & Lt; A href = "google.com" onmouseover = "OrteliusWorldMap.width = 150;" Onmouseout = "OrteliusWorldMap.width = 100" & gt; & Lt; Img src = "https://upload.wikimedia.org/wikipedia/commons/6/6f/OrteliusWorldMap.jpeg" width = "100" name = "OrteliusWorldMap" & gt; & Lt; / A & gt; Character 1 & lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt;   

This issue in trying to use elsewhere is that this refers to the current HTML Element will try to give For more information see below and see how.


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -