The method of realizing cylindrical data report by CSS

Source: Internet
Author: User

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> </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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.