本文主要包含CSS,柱状图等相关知识,佚名 希望在学习及工作中可以帮助到您
<!doctype html> <head> <style> ul.chart{padding:0;margin:0;list-style:none;border:1px #ccc solid;height:255px;font-size:9pt;background:#ddf3ff} ul.chart p{padding:0;margin:0} ul.chart .title{text-align:center;height:25px;line-height:25px;} ul.chart li{width:80px;float:left;padding:0;} ul.chart li:hover{background:#f7f7f7;} ul.chart .total{height:230px;position:relative;} ul.chart .percent{background:#f0f;width:20px;position:absolute;left:25px;bottom:0;} </style> </head> <body> <ul class=chart> <li><p class=title>最终幻想</p><div class=total><p class=percent style="height:50%;">50%</p></div></li> <li><p class=title>星之海样</p><div class=total><p class=percent style="height:10%;">10%</p></div></li> <li><p class=title>白骑士</p><div class=total><p class=percent style="height:70%;">70%</p></div></li> </ul> </body>
提示:您可以先修改部分代码再运行