日期:2014-05-17 浏览次数:20677 次
?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>使用CSS轻松绘制三角形、梯形</title> <style type="text/css"> .graph:before{ content:""; display:block; width:0; height:0; border-width:0 9px 10px 9px; border-style:none solid solid; border-color:transparent transparent red; } </style> </head> <body> <div class="graph"></div> </body> </html>?
(图形小了点哈,下面换大图)
当然:IE不定支持,你懂得……
<style type="text/css"> .graph:before{ content: ""; display: block; height: 0; width: 0px; border-width: 0px 30px 45px 145px; border-style: none solid solid; border-color: transparent transparent red; } </style>?
<style type="text/css"> .graph:before{ content: ""; display: block; height: 0; width: 0px; border-width: 0px 0px 45px 145px; border-style: none solid solid; border-color: transparent transparent red; } </style>?
<style type="text/css"> .graph:before{ content: ""; display: block; height: 0; width: 30px; border-width: 0px 15px 40px 65px; border-style: none solid solid; border-color: transparent transparent red; } </style>?
?