标签:type size yellow auto let no-repeat position ali head
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
/*!*外边界是0*! margin*/
*{
margin: 0;
}
#id1{
height: 1200px;
width: 1600px;
color: yellow;
font-size: 100px;
/*字体居中text-align:center*/
text-align: center;
行高
line-height: 100px;
background-color: #c6e2fd;
背景图
background-image: url("2.jpg");
/*background-repeat: repeat-y;*/
不重复
background-repeat: no-repeat;
background-size: 300px 300px;
图片位置
/*background-position: center;*/
background-position:top center;
/*background-size: auto;*/
可写在一行
/*background: url("2.jpg") no-repeat 100px 100px yellow;*/
}
p{
color: #fac237;
background: #b18621;
text-align: center;
line-height: 200px;
letter-spacing: 50px;
word-spacing: 30px;
}
</style>
</head>
<body>
<div id="id1">LOL</div>
<p>p1 p2</p>
</body>
</html>
标签:type size yellow auto let no-repeat position ali head
原文地址:https://www.cnblogs.com/zxy01/p/13205243.html