先來看一下效果,這在CSS3之前,完全是不可想象的,只有圖片才能做的到,但在HTML5和CSS3大行其道的今天,實現(xiàn)這種效果,那都不是事啊。
看一下實現(xiàn)的代碼:
!DOCTYPE html> html> head> style type='text/css'> /* 上三角 */ .arrow-up { width: 0; height: 0; border-left: 20px solid transparent; border-right: 20px solid transparent; border-bottom: 20px solid green; } /* 下三角 */ .arrow-down { width: 0; height: 0; border-left: 20px solid transparent; border-right: 20px solid transparent; border-top: 20px solid orange; } /* 右三角 */ .arrow-right { width: 0; height: 0; border-top: 60px solid transparent; border-bottom: 60px solid transparent; border-left: 60px solid blue; } /* 左三角 */ .arrow-left { width: 0; height: 0; border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-right: 10px solid silver; } /style> /head> body> div class="arrow-up">/div> div class="arrow-down">/div> div class="arrow-left">/div> div class="arrow-right">/div> /body> /html>
標(biāo)簽:滄州 混顯 鶴壁 萊蕪 邵陽 賀州 貴州 廣安
巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《利用CSS3新特性創(chuàng)建透明邊框三角》,本文關(guān)鍵詞 利用,CSS3,新特性,新,特性,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。