This paper illustrates the method of realizing cylindrical data report by CSS. Share to everyone for your reference. The specific analysis is as follows:
Here to demonstrate the use of CSS code to achieve the results of cylindrical data report, is actually using CSS to control the background image of the tile range to achieve the high and low effect of the cylinder, this is just a relatively simple CSS Data report demo, more complex functions need to slowly and constantly use CSS, and constantly accumulate knowledge.
The
code is as follows: <! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >
<html>
<head>
<title> Cylindrical Data Report </title>
<meta http-equiv= "Content-type" content= "text/html"; Charset=utf-8 ">
<style type= "Text/css" >
. chart {
Font-family:tahoma;
font-size:12px;
border:1px solid #ccc;
Float:left;
margin:0;
padding:. 4em. 1em;
}
. chart Li {
List-style:none;
Float:left;
width:5em;
Text-align:center;
Background:url (http://files.jb51.net/file_images/article/201505/2015512175921323.gif) center 1.6em no-repeat;
}
. Chart Li span {
Display:block;
text-indent: -999em;
padding-bottom:90px;
Background:url (http://files.jb51.net/file_images/article/201505/2015512175912559.gif) center-1px no-repeat;
border-top:5px solid #fff;
}
. Chart strong {
Display:block;
Text-align:center;
Font-weight:normal;
}
</style>
</head>
<body>
<ul class= "Chart" >
<li><em> January </em><span style= "background-position:center-35": </span><strong >36%</strong></li>
<li><em> February </em><span style= "background-position:center-40": </span><strong> 56%</strong></li>
<li><em> March </em><span style= "background-position:center-87": </span><strong >92%</strong></li>
<li><em> April </em><span style= "background-position:center-45": </span><strong >48%</strong></li>
<li><em> May </em><span style= "background-position:center-23": </span><strong >31%</strong></li>
</ul>
<p style= "Clear:both" ></p><p>&nbsp;</p>
</body>
</html>
The effect is as shown in the following illustration:
I hope this article will help you with the DIV+CSS web design.