- The IMG tag itself is the display of the picture, but through the CSS can be set for its background picture, let it and its own picture to display, the final effect will make you marvel. Of course, the discovery comes from a foreigner, so the code is shared with you right away. Before this, I have never thought of this idea, I think this idea can be applied to a considerable number of places.
<!DOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 strict//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd "><HTMLxmlns= "http://www.w3.org/1999/xhtml"Lang= "en"Xml:lang= "en"><Head><title>CSS Fancy usage: Setting a background image for img</title><styletype= "Text/css">Div{background:url (' http://www.codefans.net//jscss/demoimg/201312/blur.jpg ') no-repeat top Left;width:232px;Height:200px; }img{Display:Block;background:url (' http://www.codefans.net//jscss/demoimg/201312/parallax.gif ') No-repeat bottom left;padding:93px 100px 75px 100px;}</style></Head><Body><Div><imgsrc= "Http://www.codefans.net//jscss/demoimg/201312/Anime_runner.gif"alt= "Runner" /></Div></Body></HTML>
----Reprint
CSS Strange usage img Add background image matching display--stunning effect