【发布时间】:2016-06-12 03:12:05
【问题描述】:
我想在 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>
【问题讨论】: