1 回答

TA貢獻(xiàn)1825條經(jīng)驗(yàn) 獲得超6個(gè)贊
像這樣覆蓋你的圖像
<!DOCTYPE html>
<html>
<head>
<title>some title</title>
<style>
* {
box-sizing: border-box;
}
.img-container {
width: 300px;
height: 200px;
position: relative;
}
.img-container img, .img-container .img-cover {
width: 100%;
height: 100%;
}
.img-container .img-cover {
position: absolute;
top: 0;
left: 0;
}
</style>
</head>
<body>
<div class="img-container">
<img src="your_image.png">
<div class="img-cover"></div>
</div>
</body>
</html>
- 1 回答
- 0 關(guān)注
- 162 瀏覽
添加回答
舉報(bào)