Here is the link to my code: http://jsfiddle.net/yHPTv/2491/
I am experiencing an issue with the transition effect. The hidden element is supposed to slide into view from the right edge of the .block
element, but instead, it just appears suddenly.
.block {
position: relative;
width: 500px;
height: 300px;
overflow: hidden;
background: lightgrey;
}
.block .hidden {
background: red;
padding: 3px 10px;
position: absolute;
bottom: 0;
left: 100%;
transition: 1s;
}
.block:hover .hidden {
transition: 1s;
left: auto;
right: 0;
}
<div class="block">
<div class="hidden">ABCDEFGHIJKL</div>
</div>
I suspect that the issue lies with the left: auto
property. When I change it to left: 50%
, it sort of works, but not exactly as desired.
Any insights would be greatly appreciated.