<! DOCTYPE html>
CSS style borderBasic border
<body> <div style= "border:1px dotted red;" > First layer Border </div><!--border: Border width solid: Border Style solid line (dotted dashed) color:red--></body>
Border other styles
<body> <div style= "HEIGHT:48PX; width:80%; border:1px solid Brown; font-size:16px; Text-align:center; line-height:48px; " > Second Border </div> <!--height:48px Border height -<!--width:80% Width page 80%--> <!--border: 1px solid brown border width, style, color- <!--font-size:16px; Font Size- <!--text-align:center, horizontal center- <!--line-height:48px; vertically centered--></body>
-" Click to show Effect
CSS style floatingFirst knowledge of float
<body> <div style= "width:20%;background-color:red;float:left;" > Left </div> <div style= "width:80%;background-color:black;float:right;" > Right </div></body>
-" Click to show Effect
Float test Page
-" Click to show Effect
Note: <body style= "margin:0 auto;" > Remove the gap from the top of the browser;<div style= "Clear:both" ></div> child border floats, displays the border lines of the parent border
CSS style displayBlock-level labels and inline labels are converted to each other
<body> <div style= "Background-color:red;display:inline" > Block-level </div> <span style= " Background-color: #2459a2;d Isplay:block "> in-line </span></body>
-" Click to show Effect
Note: Display:inline is converted to inline labels, display:block to block-level labels, and Display:none not displayed
Inline Tags: Unable to set height, width, padding margin
Block-level Tags: set height, width, padding margin
<body> <span style= "Background-color: #2459a2;d isplay:inline-block;height:50px;width:70px" > inline </span> <div style= "Background-color:red;display:inline" > block-level </div></body>
-" Click to show Effect
Note: Display:inline-block has the properties of inline (the default number of its own) and the properties of the block (you can set the height, width, padding, margin)
CSS style marginMargins margin
<body> <div style= "border:2px solid red;height:70px;" > <div style= "background-color:green;height:50px; margin-top:25px; " ></div> </div></body>
-" Click to show Effect
Note: margin-top:25px represents the margin, and the distance between the child border and the parent border top is 25px
Internal margin padding
<body> <div style= "border:2px solid red;height:70px;" > <div style= "background-color:green;height:50px; padding-top:25px; " ></div> </div></body>
-"" Click Show Effects
Note: padding-top:25px represents the inner margin, and the distance between itself and top within the child border is 25px
Python development "frontend": CSS