Border attribute of Css

Source: Internet
Author: User

Border attribute of Css
Set the border attribute: Set the border style of the object, and set a single upper border, lower border, left border, and right border style to beautify the appearance. Border is used for separation and layout planning. 1. Set the left border for the four borders border-left. Generally, use border-right to set the right border for the left border style separately. Generally, use border-top to set the upper border for the right border style separately, generally, use border-bottom to set the upper border style separately. Generally, use the lower border style separately. Sometimes the lower border style can be used as the css underline effect. 2. abbreviated as # divcss5 {border: 1px solid # 00F} sets the divcss5 object box 1px pixel blue solid line border 3, border three styles, we can usually set the Border width (thickness) border style, border color attributes and parameters. 1) border color: border-color: #0002), border thickness (width): border-width: 1px set the border thickness width using numbers + units, for example, if the Border width is 1 px, the border must be a positive number and a value greater than 0. Otherwise, the border style is invalid. 3) border style: border-style: solid border style value: none: no border. It has nothing to do with any specified border-width value. Den den: hides the border. Internet Explorer does not support dotted: IE4 + on MAC platforms and IE5.5 + on WINDOWS and UNIX platforms. Otherwise, it is solid-line (commonly used) dashed: IE4 + on MAC and IE5.5 + on WINDOWS and UNIX platforms are dotted lines. Otherwise, it is solid line (commonly used) solid: solid line border (commonly used) double: double Line border. The sum between the two single lines equals to the specified border-width value groove: Draw a 3D groove ridge Based on the border-color value: Draw a diamond border inset Based on the border-color value: draw a 3D Concave edge outset Based on the border-color value: based on the value of border-color, draw 3D convex edges. 4. Write down, bottom, left, and right borders in an abbreviated form. CSS style setting method 1. border-top on a 1px black dotted line: 1px dashed #0002, 1px black solid line bottom border-bottom: 1px solid #0003, 1px black dotted line left border-left: 1px dashed #0004, 1px black solid line right border-right: 1px solid #000 5. The three sides have edges while the other side have no setting skills. For example, there is a border between the left and right sides and the style is black 1PX width solid line border, but there is no border on the top. CSS code: border: 1px solid #000; border-top: none; Note: border: 1px solid #000; and border-top: none; the order before and after cannot be changed. Because CSS reading has the principle of reading from top to bottom and from left to right, the entire border style is set first, and then the top border on the top is declared as "none" is meaningless, that is, the style required by the instance. Therefore, you do not need to set lower, left, and right, saving some code.

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.