admin管理员组文章数量:1289381
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;
}
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;
}
Share
Improve this question
edited Apr 15, 2013 at 14:49
Mils
asked Apr 15, 2013 at 14:16
MilsMils
4883 silver badges15 bronze badges
1
- 4 transform: rotate(180deg); did the trick for me – Stefan Candan Commented Apr 15, 2013 at 14:20
3 Answers
Reset to default 7Make the progress bar block and just float it to the right:
.progress-bar span {
display: block;
float: right;
...
}
DEMO
Make the span a block element and use margin-left
. But you need to inverse the progress as well. E.g. 30% needs margin-left:70%
;
http://jsfiddle/fmaGZ/2/
Having a <progress class="progress" />
html tag you could use:
.progress {
direction: rtl;
}
本文标签: javascriptReverse progressbar using CSS3Stack Overflow
版权声明:本文标题:javascript - Reverse progressbar using CSS3 - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741402971a2376779.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论