Differences between outline and border

Source: Internet
Author: User

The attributes of outline are similar to those of border.

Outline has outline-color, outline-style, outline-style, outline-width, and an attribute used to set the offset position: Outline-offset. When the offset value is negative, the number of pixels in the image offset.

The default value of outline-color is black, while that of border-color is the font color.

You cannot set an edge for outline, so it is always closed. Border can separately set border-top and border-right.


In addition, the most important difference is that outline does not affect the box model, so it does not damage the Document Stream and does not affect the webpage layout.

Differences between outline and 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.