A simple example of CSS for triangulation

Source: Internet
Author: User
Tags border color
In many page production will be designed to highlight a triangle, below gives a compatible with a variety of browser design methods:

<! DOCTYPE html>

Key points to note:

1. font-size:0; function is compatible with IE, or IE will appear trapezoidal, or line-height:0;

2. In order to improve the extensible line, set the border color transparent, but the transparent in IE will have gray, compatible method is to set the corresponding border style of dashed;

3. In the project will generally choose to use absolute positioning to position the triangle to the corresponding location, but sometimes the use of inverted triangle is also can not use, the result is a lot of height in the container, the method is to set the height of the container, and then overflow:hidden; (Triangular design principle)

Above this pure CSS to achieve a simple example of the triangle is the small part of the whole content to share to everyone, I hope to give you a reference, but also hope that we support topic.alibabacloud.com.

Related Article

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.