Home > Web Front-end > CSS Tutorial > How to make a triangle compatible with all browsers using css

How to make a triangle compatible with all browsers using css

WBOY
Release: 2018-10-30 10:28:51
forward
2665 people have browsed it

this article mainly introduces how to use css to create a triangle that is compatible with all browsers. it has certain reference value. interested friends can refer to it. i hope it will be helpful to you!

use css to write triangles, compatible with ie7

.arrow-up { 
        width:0px; 
        height:0px; 
        border-left:10px solid transparent;  
        border-right:10px solid transparent; 
        border-bottom:10px solid red;  
        font-size:0px; 
        line-height:0px;
        margin: 0 auto;
    } 

    .arrow-down { 
        width:0px; 
        height:0px; 
        border-left:10px solid transparent; 
        border-right:10px solid transparent; 
        border-top:10px solid blue; 
        font-size:0px; 
        line-height:0px; 
    } 
        
    .arrow-left { 
        width:0px; 
        height:0px; 
        border-bottom:10px solid transparent; 
        border-top:10px solid transparent; 
        border-right:10px solid #DC143C; 
        font-size:0px; 
        line-height:0px;
    } 
    .arrow-right { 
        width:0px; 
        height:0px; 
        border-bottom:10px solid transparent; 
        border-top:10px solid transparent; 
        border-left:10px solid #FF00FF; 
        font-size:0px; 
        line-height:0px; 
    }
Copy after login

the effect is as follows:

How to make a triangle compatible with all browsers using css

the above is this article that’s all. i hope you all like it.

【recommended tutorials】

1. css video tutorial
2. css online manual
3. bootstrap tutorial

Related labels:
source:cnblogs.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template