CSS sort of common text style

Common text styles

High line: line-height, when I have a high i-line sized to the height of the current element, the effect may be achieved when the vertical center line of text displayed within the current element

The horizontal alignment: text-align: left | center | right, respectively (right-justified left-aligned, centered,) it set the text box at the current level among

Text size: font-size, the unit px, browsers will generally have a minimum display font

Font weight: font-weight, may be provided on keywords or values ​​(100 to 900), keywords are normal indicates normal, and bold indicates the thickening

Font Name: font-family, commonly used is the "Microsoft Ya black", "black body"

Font color: color, set the color of the text, you can use English words, you can also use hexadecimal

<! DOCTYPE HTML > 
< HTML > 
    < head > 
        < Meta charset = "UTF-. 8" > 
        < title > common text style </ title > 
        < style type = "text / CSS" > 
            div { 
                / * in claim disposed inside the div text, centered in the vertical direction among div, div height of 200px * / 
                height : 200px ; 
                width : 200px ; 
                Line-height : 200px ; 
                background: orange;
            }
        </style>
    </head>
    <body>
        <div>
            Victory in front
        </div>
    </body>
</html>

 

Guess you like

Origin www.cnblogs.com/jingdenghuakai/p/11082337.html