<!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>
<style>
div {
width: 300px;
height: 300px;
margin: 109x;
}
div:nth-child(1) {
background-color: lightblue;
}
div:nth-child(2) {
background-image: url(./static/images/logo.jpg);
background-size: 100% 100%;
background-repeat: no-repeat;
}
div:nth-child(3) {
background-image: url(./static/images/logo.jpg), url(./static/images/logo2.jpg);
background-size: 50% 100%, 50% 100%;
background-repeat: no-repeat, no-repeat;
background-position: top left, 150px 0;
}
div:nth-child(4) {
background-image: url(./static/images/logo.jpg);
background-size: 100% 100%;
background-repeat: no-repeat;
background-attachment: fixed;
}
</style>
</head>
<body>
<div></div>
<div></div>
<div></div>
<div></div>
</body>
</html>
Web / CSS / hk3
于 2024-08-24 19:25:40 首次发布