About use of CSS

    The use css
        1. inline style (inline styles)
        <tag style = "attribute name 1: 1 attribute value; property name 2: attribute value 2; ..."> </ tab>
        
        2. embedded in the page (internal style table)
        in the head tag which add a child tag
        <style>
            selector {
                attribute name 1: 1 attribute value;
                property name 2: attribute value 2;
                ......
            }
        </ style>
        
        
        3. external files (external style table)
        in the head tag which add a child tag
        <link rel = "stylesheet" href = " file path css" />
        
        4. external introducing pattern
        mainly in style initialization. Because there are some labels have their own style, we need to be emptied to facilitate their computing
        
        
        css syntax: (Symbols are in English)
        selector {
            property name 1: attribute value 1;
            attribute name 2: attribute value 2;
            ..... .


        The basic structure is as follows:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <link rel="stylesheet" href="" />
        <!--<style>
            div{
                width:200px;
                height:200px;
                background-color:#f00;
            }
        </style>-->
        <link rel="stylesheet" href="04.css" />
    </head>
    <body>

<!--<div style="width: 100px;height: 100px;"></div>-->
        <div></div>
    </body>
</html>

Guess you like

Origin www.cnblogs.com/zxy52/p/10938097.html