CSS-2

day 39

学习链接:https://www.cnblogs.com/yuanchenqi/articles/5977825.html

4  文本属性

font-size: 10px;

text-align: center;   横向排列

line-height: 200px;   文本行高 通俗的讲,文字高度加上文字上下的空白区域的高度 50%:基于字体大小的百分比

vertical-align:-4px  设置元素内容的垂直对齐方式 ,只对行内元素有效,对块级元素无效


text-indent: 150px;   首行缩进
letter-spacing: 10px;
word-spacing: 20px;
text-transform: capitalize;   所有单词的首字母大写

5   边框属性

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <style>
        div{
            background-color: turquoise;
            height: 100px;
            /*text-align: center;*/
            line-height:100px;
            /*这里height 设置值和line-height 相同值的话。我们可以让文本内容居中*/
        }
        .div1{
            border: 1px solid rebeccapurple;
        }
    </style>
</head>
<body>


<div class="div1">介绍文本</div>

</body>
</html>





border-style: solid;
 
border-color: chartreuse;
 
border-width: 20px;
 
简写:border: 30px rebeccapurple solid;

  

5   列表属性

ul,ol{   list-style: decimal-leading-zero;
         list-style: none; <br>       这个比较重要
         list-style: circle;
         list-style: upper-alpha;
         list-style: disc; }    

  

猜你喜欢

转载自www.cnblogs.com/smail-bao/p/9774174.html