利用CSS3新特性創(chuàng)建透明邊框三角
先來看一下效果,這在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>
上一篇:cookie解決微信不能存儲localStorage的問題
欄 目:CSS/HTML
本文標(biāo)題:利用CSS3新特性創(chuàng)建透明邊框三角
本文地址:http://www.jygsgssxh.com/a1/CSS_HTML/11506.html
您可能感興趣的文章
- 04-02html5的新特性有哪些,HTML5的新特性有哪些?
- 01-11CSS3中Transition屬性詳解以及示例分享
- 01-11CSS3+Js實現(xiàn)響應(yīng)式導(dǎo)航條
- 01-11CSS3實例分享之多重背景的實現(xiàn)(Multiple backgrounds)
- 01-11如何使用CSS3畫出一個叮當(dāng)貓
- 01-11《CSS3實戰(zhàn)》筆記--漸變設(shè)計(三)
- 01-11《CSS3實戰(zhàn)》筆記--漸變設(shè)計(一)
- 01-11《CSS3實戰(zhàn)》筆記--漸變設(shè)計(二)
- 01-11CSS3實現(xiàn)動態(tài)翻牌效果 仿百度貼吧3D翻牌一次動畫特效


閱讀排行
本欄相關(guān)
- 04-02html5算法,html5協(xié)議
- 04-02html5圖形,html5圖形縮放
- 04-02html5登錄模板,html5登錄注冊模板
- 04-02html5的例子,HTML示例
- 04-02html5的canvas,html5的canvas的作用
- 04-02關(guān)于html5播放視頻代碼的信息
- 04-02html5chm手冊,html操作手冊
- 04-02朋友圈html5,朋友圈發(fā)泄情緒的句子
- 04-02html5的新特性有哪些,HTML5的新特性有哪
- 04-02html5掃二維碼,html5調(diào)用手機(jī)攝像頭掃描
隨機(jī)閱讀
- 01-10SublimeText編譯C開發(fā)環(huán)境設(shè)置
- 01-11ajax實現(xiàn)頁面的局部加載
- 08-05dedecms(織夢)副欄目數(shù)量限制代碼修改
- 08-05DEDE織夢data目錄下的sessions文件夾有什
- 01-10C#中split用法實例總結(jié)
- 04-02jquery與jsp,用jquery
- 01-11Mac OSX 打開原生自帶讀寫NTFS功能(圖文
- 08-05織夢dedecms什么時候用欄目交叉功能?
- 01-10delphi制作wav文件的方法
- 01-10使用C語言求解撲克牌的順子及n個骰子


