<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>背景background</title>
<style>
/* 背景:
1.背景颜色:background-color
颜色值:颜色的单词,#十六进制,rgb(三原色)/
rgba(透明度)
2.背景图片:background-image:url(图片地址)
3.背景的复合样式background:url() no-repeat fixed;
no-repeat:不重复 fixed:固定背景
center/100% 100%:图片定位(方位词),背景图片宽度,
背景图片高度*/
.box{
width:1920px;
height:960px;
border:1px solid green;
background-image: url(img/bacg.jpg);
font-size: 30px;
}
#box2{
width:1000px;
height:500px;
border:1px dotted red;
background:url(img/bacg.jpg) no-repeat
center/100% 100%;
font-size: 30px;
}
</style>
</head>
<body>
<div class="box">与同步工具</div>
<div id="box2">哈哈哈</div>
</body>
</html>
背景background
最新推荐文章于 2024-08-20 16:49:19 发布