文本样式

 1 <!DOCTYPE html>
 2 <html>
 3     <head>
 4         <meta charset="utf-8">
 5         <title></title>
 6         <style type="text/css">
 7     /*
 8     1.text-transform可以用来设置文本的大小写
 9     可选值:
10     none 默认值,该怎么显示就怎么显示,不做任何处理
11     capitalize 单词的首字母大写,通过空格来识别单词
12     uppercase 所有的单词都大写
13     lowercase 所有的单词都小写
14     */
15    .p1{
16        text-transform: capitalize;
17    }
18    /*
19    2.text-decoration可以用来设置文本的修饰
20    可选值:
21    none 默认值,不添加任何修饰,正常显示
22    underline 为文本添加下划线
23    overline 为文本添加上划线
24    line-through 为文本添加删除线
25    */
26    .p2{
27        text-decoration: underline;
28    }
29    /*
30    超链接会默认添加下划线,也就是超链接text-decoration的默认值是underline
31    如果需要去除超链接的下划线需要将样式设置为none
32    */
33    a{
34       text-decoration: none;
35       text-indent: 100px;
36   }
37   /*
38   3.letter-spacing 可以指定字符间距
39   4.word-spacing 可以指定单词之间的距离,对中文没有什么用
40   */
41  .p3{
42      font-size: 16px;
43      word-spacing: 1px;
44      letter-spacing: 1px;
45      text-indent: -2em;
46  }
47  /*
48  5.text-align 用于设置文本的对齐方式
49  可选值:
50  left 默认值,文本靠左对齐
51  right 文本靠右对其
52  center 文本居中
53  justify 两端对齐 通过调整文本之间的空格的大小来达到一个两端对齐的目的
54  
55  
56  6.text-indent 用来设置首行缩进 1em是一个字体大小,
57  当给它指定一个正值时,会自动向右侧缩进指定的像素
58  如果为它指定一个负值,则会向左移动指定像素 用户见不到的文字搜索引擎可以看见,
59  目的是将一些不想显示的文字隐藏起来
60  */
61        </style>
62     </head>
63     <body>
64         <p class="p1">
65             "we should run"
66         </p>
67         <p class="p2">
68             "we should run"
69         </p>
70         <a href="#">i am a girl.</a>
71         <p class="p3">
72             "we should runin.getline()函数是处理数组字符串的,其原型为cin.getline(char * , int),第一个参数为一个char指针,第二个参数为数组字符串长度。
73 getline(cin,str)函数是处理string类的函数。第二个参数为string类型的变量。 "
74         </p>
75     </body>
76 </html>

 

posted @ 2019-07-16 01:30  zuiaimiusi  阅读(161)  评论(0编辑  收藏  举报