<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>背景位置-精确单位</title>
<style>
.zzf {
width: 500px;
height: 300px;
background-color: pink;
background-image: url(image/批注\ 2020-08-14\ 100704.png);
background-repeat: no-repeat;
background-position: 50px 20px ;
}
div {
width: 500px;
height: 300px;
background-color: pink;
background-image: url(image/批注\ 2020-08-14\ 100704.png);
background-repeat: no-repeat;
background-position: 20px ;//默认居中
}
</style>
</head>
<body>
<div class="zzf"></div>
<br>
<div></div>
</body>
</html>
CSS背景位置-精确单位
最新推荐文章于 2020-08-24 10:19:39 发布