简体   繁体   中英

Bar chart, like bootstrap progress bar

I am trying to achieve this below:

在此输入图像描述

I basically want these to represent data i'm pulling from database. But i cannot figure out hour to achieve this.

So i figured i can possibly use bootstrap progress bar but style it a little different.

This is how it would be in html http://www.bootply.com/QOwn8Bs0wY

Does anyone know how i can now change the lines to be a lot closer?

I think its to do with these css styles in bootstrap.

 -webkit-linear-gradient(135deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)

But i cannot replicate the picture.

Something like this?

background-color: gray;
background-image: repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255,255,255,.5) 5px, rgba(255,255,255,.5) 10px);

I modified this a bit, it's easier to understand than the bootstrap one. Then don't forget to make it cross browser compatible.

try this

.progress {border-radius:0;}
.progress-bar-striped, .progress-striped .progress-bar {
    linear-gradient(135deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 7px 7px;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM