六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 195|回复: 0

使用CSS绘制基本图形

[复制链接]

升级  25.33%

24

主题

24

主题

24

主题

秀才

Rank: 2

积分
88
 楼主| 发表于 2013-2-8 00:42:00 | 显示全部楼层 |阅读模式
你懂得,不解释,直接上代码。
 
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title> New Document </title>  <meta name="Generator" content="EditPlus">  <meta name="Author" content="">  <meta name="Keywords" content="">  <meta name="Description" content="">  <style type="text/css">.wraper {position: relative;float: left;width: 150px;height: 150px;border: 1px solid black;padding: 10px;margin: 10px;}.wraper div {height: 0px;}.d1 {width: 1px;margin: 0 auto;border-left: 50px solid transparent;border-right: 50px solid transparent;border-bottom: 100px solid;color: red;}.d2 {width: 50px;margin: 0 auto;border-bottom: 100px solid;color: orange;}.d3 {width: 50px;margin: 0 auto;border-left: 30px solid transparent;border-right: 30px solid transparent;border-bottom: 100px solid;color: blue;}  </style> </head> <body>  <div class="wraper"><div class="d1"></div>  </div>  <div class="wraper"><div class="d2"></div>  </div>  <div class="wraper"><div class="d3"></div>  </div>   </body></html> 
显示的结果:
 
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表