<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>背景相关</title>
<style type="text/css">
body
{
background-image:url(images/android.jpg);
background-position:center;/*可以使用值代替如:100px 100px*/
background-repeat:no-repeat;
background-attachment:fixed;}
div
{
background-repeat:no-repeat;
background-image:url(images/android.jpg);
height:100px;
border:8px dashed #333;
margin:12px;
padding:12px;
}
</style>
</head>
<body>
<div style="background-clip:border-box;">border-box</div>
<div style="background-clip:content-box;">content-box</div>
<div style="background-clip:padding-box">padding-bo</div>
<div style="background-clip:text">text</div>
<div style="background-repeat:round; background-size:5%"></div>
<div style="background-repeat:repeat; background-size:conver; "></div>
</body>
</html>
17、实例 背景相关
最新推荐文章于 2024-02-14 22:51:21 发布