Increase Or Grow A Div Tag Width From Right To Left
So basically what needs to be done is that, at time 0, the width is 0, and time 1, the width should be increased graduately, from right to left i guess the hardest part is to anima
Solution 1:
You can use float:right
to place the container on the right:
#abc {
width: 100%;
height: 100px;
background-color: pink;
animation-name: reducetime;
animation-duration: 1s;
float: right;
}
@keyframes reducetime {
0% {
width: 0;
}
100% {
width: 100%;
}
}
<divid="abc"></div>
Solution 2:
The width isn't animated from the left or the right, it's just the content of the div that is positioned from the left edge of the div.
Just position the content relative to the right edge to make it be hidden from the left. Depending on what you have in the div, you might need another container (div) inside it, that you style using position: absolute; right: 0
.
Post a Comment for "Increase Or Grow A Div Tag Width From Right To Left"