123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <!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>
- #div1 {
- /* 宽高 */
- width: 1200px;
- height: 800px;
- /* 背景 */
- /* background: red; */
- background-color: red;
- background-image: url(../images/img01.jpeg);
- /* repeat|no-repeat */
- background-repeat: no-repeat;
- /* 背景图片位置 水平(固定值|left|center|right) 垂直(固定值|top |center|bottom) */
- /* background-position: -100px 200px ; */
- background-position: center top ;
- /* 简写 */
- background: red url(../images/img01.jpeg) no-repeat center top ;
- }
- #div2{
- width: 300px;
- height: 50px;
- background: red;
- /* 字体相关属性 */
- /* 字体大小 最小12px 默认大小16*/
- font-size:25px;
- /* 字体粗细 100 -900 默认值400|normal bold|700 */
- font-weight:200 ;
- /* 字体 */
- font-family:Microsoft YaHei,Heiti SC,tahoma,arial,Hiragino Sans GB,"\5B8B\4F53",sans-serif;
- /* 样式 风格 italic|normal */
- font-style: normal;
- /* 文本相关样式 */
- /* 水平对齐:left左|center中|right右 */
- text-align:left ;
- /* 垂直对齐方式 行高(line-height)=高 实现文本的垂直居中*/
- line-height:50px ;
- /* 文本缩进 */
- text-indent:20px ;
- }
- a{
- /* 文本修饰 none没有| line-through中划线 |underline下划线| overline上划线(不使用) */
- text-decoration:overline;
- }
- </style>
- </head>
- <body>
- <!-- <div id="div1">1111111</div> -->
- <div id="div2">我是一个DIV</div>
- <a href="#">baidu </a>
- </body>
- </html>
|