首頁 > web前端 > css教學 > 主體

如何用css製作一個能夠相容於所有瀏覽器的三角形

WBOY
發布: 2018-10-30 10:28:51
轉載
2585 人瀏覽過

這篇文章主要介紹如何用css製作一個能夠相容於所有瀏覽器的三角形,有一定的參考價值,有興趣的朋友可以參考一下,希望對你有幫助!

利用css寫三角形,相容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; 
    }
登入後複製

 

效果如下:

如何用css製作一個能夠相容於所有瀏覽器的三角形

以上是本文的全部內容了,希望大家能夠喜歡。

【相關教學推薦】

1.  css影片教學
2. css線上手冊
3. bootstrap教學

相關標籤:
來源:cnblogs.com
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!