CSS寫圖表 效果 代碼

來源:互聯網
上載者:User
 代碼如下 複製代碼

<!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=gb2312" />
<title>圖表思路</title>
</head>
<style type="text/css">
*{ margin:0px; padding:0px;}
ul,li{ list-style:none;}
#outbox{ width:300px; height:300px; border:#ccc 1px solid; background-color:#fff; margin:30px auto; position:relative;}
#outbox h1{ font-size:14px; margin:20px;}
.list1 li{ float:left; line-height:40px; width:30px; color:#fff; text-align:center; position:absolute; bottom:0px;}
.list1 li.b1{ background-color:#333; left:30px;}
.list1 li.b2{ background-color:#888; left:100px;}
.list1 li.b3{ background-color:#444; left:170px;}
.list1 li.b4{ background-color:#555; left:220px;}
</style>
<body>
<div id="outbox">
   <h1>這是一個圖表</h1>
   <ul class="list1">
     <li style="height:150px;" class="b1">30</li>
  <li style="height:100px;" class="b2">60</li>
  <li style="height:70px;" class="b3">90</li>
  <li style="height:30px;" class="b4">120</li>
   </ul>
</div>
</body>
</html>
相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.