使用CSS3反转进度条 [英] Reverse progressbar using CSS3

查看:118
本文介绍了使用CSS3反转进度条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有此


I have this EXAMPLE.

I want to reverse the progress bar 180 degree to progress from right to left. To obtain something like this :

I tried to change the transition attribute but no result.

Code :

.progress-bar span {
        display: inline-block;
        height: 100%;
        background-color: #777;
        -moz-border-radius: 3px;
        -webkit-border-radius: 3px;
        border-radius: 3px;
        -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset;
        -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset;
        box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset;
        transition: width .4s ease-in-out;      
}

解决方案

Make the progress bar block and just float it to the right:

.progress-bar span {
    display: block;
    float: right;
    ...
}

DEMO

这篇关于使用CSS3反转进度条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆