Div border do the triangle principle

Source: Internet
Author: User
. t0{margin:30px;      height:200px;      width:200px;      Border-top:solid 100px Red;      Border-left:solid 100px Green;      Border-right:solid 100px Orange; Border-bottom:solid 100px Blue;}

Div border is a width and color, when the width of the div is relatively large, such as the above code on each side 100 pixels, the color is not the same, the browser how to render color? It has been tested that when the border of the larger width intersect:

1, only the adjacent edges will intersect, the edge is not possible to intersect

2, the intersection area (obviously the rectangle) divides into two triangles by the diagonal, two triangles renders the color of two sides respectively, the color does not overlap the situation

3, adjust the width of four sides, plus the width of the middle area, with different colors and transparent, a variety of simple polygons have been easy

Div border do the triangle principle

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.