#divyellow{
position: absolute;
clip: rect(250px auto auto auto);
}
#divred{
position: absolute;
clip: rect(0 auto 500px 0);
}
#container{
width: 500px;
height: 500px;
margin:1em auto;
position: relative;
background: #f6f6f6;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="divred"><img src="red.png" alt=""></div>
<div id="divyellow"><img src="yellow.png" alt=""></div>
</div>
</body>
</html>
还有这种神操作CLIP
最新推荐文章于 2023-12-15 10:36:05 发布