在html和javascript中移动和缩放图像

在html和javascript中移动和缩放图像,javascript,html,image,Javascript,Html,Image,我有一个图像标签,尺寸100x75。它所持有的图像从150x112缩小。我不希望图像缩小那么多,但我仍然希望容器img标记为100x75,从而剪掉图像的一些外部部分。我该怎么做?css: css: .wrapper { width : 100px; height : 75px; overflow : hidden; } html: <div class="wrapper"> <img src="..."> </div>

我有一个图像标签,尺寸100x75。它所持有的图像从150x112缩小。我不希望图像缩小那么多,但我仍然希望容器img标记为100x75,从而剪掉图像的一些外部部分。我该怎么做?

css:
css:
.wrapper {
    width    : 100px;
    height   : 75px;
    overflow : hidden;
}

html:
<div class="wrapper">
    <img src="...">
</div>
.包装纸{ 宽度:100px; 高度:75px; 溢出:隐藏; } html:
css:
.包装纸{
宽度:100px;
高度:75px;
溢出:隐藏;
}
html: