03_css常见属性

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了03_css常见属性相关的知识,希望对你有一定的参考价值。

 1 <!DOCTYPE html>
 2 <html>
 3 <head>
 4 <meta charset="UTF-8">
 5 <title>Insert title here</title>
 6 <style type="text/css" >
 7 /*
 8        字体属性:
 9    color==>文字颜色
10    font-family==>文字样式
11    font-size==>文字大小
12    font-style==>文字样式(斜体..)
13    font-weight==>文字加粗
14    font-variant==>异形字
15   */
16 p{
17    /* 字体相关属性 
18    font-size:100px;
19    font-family:黑体;
20    font-style:italic;
21    font-weight:900;
22    font-variant:small-caps; 
23    复合属性:
24    font: font-style || font-variant || font-weight || font-size || font-family
25    */
26    font : italic small-caps 900 100px 黑体;
27 }
28  body{
29     /*背景相关属性
30      background-color:blue;
31      background-image:url("Pic/001.jpg");
32      background-repeat: no-repeat;
33      background-attachment: fixed; 
34      background:background-color || background-image || background-repeat || background-attachment || background-position`````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````
35      */
复合属性
36 background: green url("Pic/001.jpg") no-repeat fixed center; 37 38 } 39 </style> 40 </head> 41 <body> 42 <p>zhangsan张三</p> 43 <p>李四</p> 44 <p>李四</p> 45 <p>李四</p> 46 <p>李四</p> 47 </body> 48 </html>

 

以上是关于03_css常见属性的主要内容,如果未能解决你的问题,请参考以下文章

覆盖一个常见的片段帮助其他标签片段

VSCode自定义代码片段——CSS选择器

VSCode自定义代码片段——CSS动画

VSCode自定义代码片段7——CSS动画

VSCode自定义代码片段7——CSS动画

VSCode自定义代码片段6——CSS选择器