国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > CSS > 正文

純CSS實現美觀大方的網頁柱狀圖效果

2024-07-11 08:36:56
字體:
來源:轉載
供稿:網友

本文實例講述了純CSS實現美觀大方的網頁柱狀圖效果。分享給大家供大家參考。具體如下:

這是一款用純CSS代碼實現的網頁柱狀圖,隨著你給出的數據柱狀圖的調試會變化,實際應用中你可以將生成柱狀圖的數據從數據庫中取得,這樣就可以適時顯示了,這款柱狀圖結構清淅,用背景圖片平鋪,給人很直觀的感覺。

復制代碼代碼如下:<!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>
<title>CSS柱狀圖</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<style type=”text/css”>
body {padding:0;margin:40px;font-size:9pt;font-family:Helvetica,Geneva,sans-serif;}
h3 {font-weight:normal;display:block;width:600px;text-align:center;}
ul#q-graph {
border:2px solid #0063be;
background:#adfe12 url(//files.Vevb.com/file_images/article/201505/2015512160152351.png) repeat-x scroll 0 0 !important;
background:#adfe12 repeat-x scroll 0 0;
height:300px !important;
height:304px;
width:600px;
position:relative;
list-style:none;
margin:1.1em 1em 3.5em;
padding:0;
}
#q-graph li {
position:absolute;
text-align:center;
bottom:0;
padding:0
margin:0;
}</p>
<p> li.qtr {
width:150px;
height:300px;
border-right:1px dotted #41a3e2;
z-index:2;
}
li#q1 {left:0;}
li#q2 {left:150px;}
li#q3 {left:300px;}
li#q4 {left:450px;border-right:none;}</p>
<p> #q-graph ul {list-style:none;}</p>
<p> li.bar {
width:34px;
color:#fff;
}
li.north {
left:36px;
background:#ddd url(//files.Vevb.com/file_images/article/201505/2015512155936873.gif) no-repeat 0 0;
}
li.south {
left:80px;
background:#ddd url(//files.Vevb.com/file_images/article/201505/2015512155936873.gif) no-repeat -34px 0;
}</p>
<p> li#ticks {
left:0;
height:300px;
width:100%;
z-index:1;
}
div.ticks {
position:relative;
height:60px;
border-top:1px dotted #41a3e2;
}
div.ticks:first-child {border-top:none;}
div.ticks p {
position:absolute;
left:103%;
top:-11pt;
}
</style>
</head>
<body>
<ul id=”q-graph”>
<li id=”q1″ class=”qtr”>Q1
<ul>
<li class=”north bar” style=”height:111px;”>20</li>
<li class=”south bar” style=”height:99px;”>11</li>
</ul></li>
<li id=”q2″ class=”qtr”>Q2

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 五寨县| 凤城市| 海林市| 大城县| 东乌| 黄石市| 团风县| 喀喇沁旗| 金川县| 洪泽县| 闽侯县| 武鸣县| 百色市| 布尔津县| 武安市| 三明市| 海伦市| 大埔区| 工布江达县| 岢岚县| 商水县| 宁国市| 平原县| 万全县| 祁东县| 巧家县| 南城县| 临澧县| 威信县| 陆河县| 亚东县| 轮台县| 寻甸| 阿勒泰市| 申扎县| 新野县| 阿克苏市| 绵竹市| 临泉县| 惠来县| 盐津县|