|
@@ -0,0 +1,36 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="en">
|
|
|
+<head>
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
+ <title>Document</title>
|
|
|
+ <style>
|
|
|
+ /* 宽高 单位px 像素 */
|
|
|
+ div{
|
|
|
+ width:800px;
|
|
|
+ height:1200px;
|
|
|
+ /* background: red; */
|
|
|
+
|
|
|
+ /* 背景颜色 */
|
|
|
+ background-color: red;
|
|
|
+ /* 背景图片 */
|
|
|
+ background-image:url(./img01.jpeg);
|
|
|
+ /* background-repeat:repeat|默认值 no-repeat|不重复; */
|
|
|
+ background-repeat:no-repeat;
|
|
|
+ /* 背景图片位置:x y;
|
|
|
+ x 水平位置 固定值|left center right
|
|
|
+ y 垂直位置 固定值|top center bottom
|
|
|
+ */
|
|
|
+ background-position: center center ;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+
|
|
|
+ <div>
|
|
|
+ hjghgfhgfghfhg
|
|
|
+ </div>
|
|
|
+
|
|
|
+</body>
|
|
|
+</html>
|