How do I add a border style to a div?
It's easy to add a border style to the Div box simply by using the border plate style.
One, dashed line and solid border-TOP
Border Dash style: dashed
Border Implementation style: solid
border:1px Dashed #000
Represents set object border width 1px black dashed border
BORDER:1PX Solid #000
Represents the Set object border width 1px black implementation border
Second, the top of the div plus border-top
We'll add a 1px black border to the top of the Div.
div{border-top:1px Solid #000}
Third, give Div bottom border-TOP
Add a 2px dashed red border to the bottom of the div box
div{border-bottom:2px Dashed #F00}
Iv. add a border to the left of the Div box-TOP
Name a CSS selector css named ". Divcss5" box to the left with a blue 1px solid line border
. divcss5{border-left:1px Solid #00F}
div Code:
<div class= "DIVCSS5" > The left side of this div box is a 1px solid blue border </div>
Add a border to the right of the box div-TOP
Add 1px red solid border to the right of the Div object
div{border-right:1px Solid #F00}
Six, the box up and down border-TOP
Add 1px to the box to achieve a black border
div{border-top:1px solid #000; border-bottom:1px Solid #000}
Seven, give div box left and right border-TOP
Add 2px dashed green border around box
div{border-left:2px dashed #0F0; border-right:2px dashed #0F0}
Eight, give div four sides plus a border-TOP
Give a div four sides plus 3px to implement a black border
div{border:3px Solid #000}