0
我想在html中縮放圖像的一部分。 爲了在html中顯示圖像的一部分,我在第一條評論中寫了一段代碼。 我想放大顯示的這部分。我該怎麼做。如何在html中縮放圖像的一部分?
<!DOCTYOE html>
<html>
<head>
<style>
.container {
position: relative;
}
#clip {
position: absolute;
clip: rect(0, 120, 80px, 0);
/* clip: shape(top, right, bottom, left); NB 'rect' is the only available option */
}
</div>
</style>
</head>
<div class="container"> <img src="images10.png" /> </div>
<div class="container"> <img id="clip" src="images10.png" /> </body>
</html>
這裏有http://stackoverflow.com/questions/15757036/creating長時間的討論-a變焦效果的上一個圖像上懸停-使用-CSS – Manwal