.category {
width:150px;
height:150px;
border-radius:50%;
margin: 20px;
background-color: #f1f1f1;
line-height:150px;
text-align: center;
cursor: pointer;
font-size: 20px;
position: relative;
}
.four span {
background-color: #ddd;
line-height:17px;
position: absolute;
top:100%;
left:0;
right:0;
padding:20px;
transition: 1s;
}
.four:hover span {
bottom:0;
top:auto;
}
<div class="category four"><span>FOUR</span></div>
As this example demonstrates, the transition
does not work with the auto
value set on the top
direction.
Can anybody explain why?
Note: You have to hover over the circle.