<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<!--
background: url(image path) -100px 200px no-repeat;
上面就相当于:
background-image: url(image path)
background-position-x: -100px;
background-position-y: 200px;
background-repeat-x: no-repeat;
backgroune-repeat-y: no-repeat;
-->
<div style="height: 100px;"></div>
<div style="background-image: url(2.png); background-repeat:no-repeat;border:1px solid red;height: 20px;width: 20px;
background-position-x: 1px;
background-position-y: -19px;
"></div>
</body>
</html>
Python学习记录W15-08:CSS内容之background
最新推荐文章于 2022-11-07 13:49:58 发布