1. The composition of the frame
<!DOCTYPE HTML><HTML> <Head> <MetaCharSet= "UTF-8"> <title></title> <style>Div{width:400px;Height:400px;Border:1px solid Red; } </style> <!--Border composition 1, border thickness 2, border style 3, border color - </Head> <Body> <Div></Div> </Body></HTML>
2. Direction of the border
<!DOCTYPE HTML><HTML> <Head> <MetaCharSet= "UTF-8"> <title></title> <style>Div{width:400px;Height:400px;Border:1px solid Red;Border-right:5px Dashed Black; } </style> <!--the direction of the border top right bottom left border border-top Border-right Border-bottom Border-left - </Head> <Body> <Div></Div> </Body></HTML>
3. The composition and orientation of the frame
<!DOCTYPE HTML><HTML> <Head> <MetaCharSet= "UTF-8"> <title></title> <style>Div{width:400px;Height:400px;Border:1px solid Red;Border-top-color:Black; } </style> <!--Border composition 1, border thickness 2, border style 3, border color border direction Top right bottom left border Border-top Borde R-top-width Border-top-style Border-top-color Border-right Border-right-width Border-right-style border-right-color Bor Der-bottom border-bottom-width Border-bottom-style border-bottom- Color Border-left border-left-width Border-left-style Border-left-color - </Head> <Body> <Div></Div> </Body></HTML>
4. Shape of the border
<!DOCTYPE HTML><HTML> <Head> <MetaCharSet= "UTF-8"> <title></title> <style>Div{width:0px;Height:0px;Border:20px Solid Red;Border-top-color:Black; } </style> <!--shape of border: non-rectangular - </Head> <Body> <Div></Div> </Body></HTML>
5. Border Triangle
<!DOCTYPE HTML><HTML> <Head> <MetaCharSet= "UTF-8"> <title></title> <style>Div{width:0;Height:0;Border:10px Solid #fff; /*border-top-color: #ccc;*/Border-left-color:#ccc; } </style> </Head> <Body> <Div></Div> </Body></HTML>
Web front-end development engineer Learn the next day border