Get the App
SLTechnology News&Howtos  ›  Development  › 

How to realize the effect of column Chart with CSS

Shulou Source: shulou.com Published: 2022-06-01 11:43:22 11月14日 Update

This article is about how CSS achieves the histogram effect. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Call of Duty: 35%

Machine Warfare: 40%

CS:87%

Halo: 45%

Half life: 23%

To explain, each li in ul represents what we want to count. Span is the column, em is the name of the statistical item, and strong is the statistical value. We can add some background colors to distinguish them.

.chart {

List-style:none

Font-family:' Arial'

Font-size:14px

Border:1pxsolid#ccc

Margin:0

Padding:5px

Background:#F2F1D7

}

.chartli {

Width:400px

Background:#DDF3FF

}

Run the code:

.chart {

List-style:none

Font-family:' Arial'

Font-size:14px

Border:1pxsolid#ccc

Margin:0

Padding:5px

Background:#F2F1D7

}

.chartli {

Width:400px

Background:#DDF3FF

}

Call of Duty: 35%

Machine Warfare: 40%

CS:87%

Halo: 45%

Half life: 23%

Thank you for reading! This is the end of the article on "how to achieve histogram effect in CSS". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Tags: Content statistics effects mission halo half life Arial war more machine article good practical code representative name numerical value article column look. Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Shulou Information Apple NVidia Shulou Technology