Class Selector (CSS selectors)

In class selector (.) Is the prefix, the class name.

Definition of the class attribute in the tag, and then set the attribute value class name selector.

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
 <link rel="stylesheet" type="text/css" href="../css/index.css" />
</head> <body> <div class="leiming"> </div> </body> </html>

Select the class name in index.css in, you can add that this div style of.

.leiming{
width:100px;
height:100px;


}

2019-08-23  22:47:59

Guess you like

Origin www.cnblogs.com/qf928/p/11403042.html