CSS Box model border

Source: Internet
Author: User

1 <! DOCTYPE html>2 3 4 <meta charset= "UTF-8" >5 <title>Document</title>6 <style type= "Text/css" >7 . Box{8 width:300px;9 Height:390px;Ten Background-color:Pink; One Border-top-style:Solid;/*Linetype*/ A Border-top-color:Red;/*Top Border Color*/ - Border-top-width:5px;/*Top Border thickness*/ -  the Border-bottom-style:dotted;/*Point Line*/ - Border-bottom-color:Blue; - Border-left-style:Dashed;/*Dashed Lines*/ - Border-left-color:#467890; +             /*four borders are the same*/ - Border:5px Solid Blue; +} A </style> at  - <body> - <div class= "box" > Distance </div> - </body> - 

CSS Box Model:
1. Border border
Border-top-style(line): Solid (solid)
Dotted (point line)
Dashed (dashed line)
Border-top-color (border color)
Border-top-width (border thickness)

2. The Border property shorthand:
border-top:5px solid red;
Features: No sequential restrictions. Line type must be written
Four when the border is the same, the wording:
border:5px Solid Red
Features: no order required. Line type is a must-write item

CSS Box model border

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.