I have following HTML where hover grows div downwards but I would like to grow upwards.
<html>
<head>
<style type="text/css">
div
{
position:absolute;
top:130px;
left:30px;
width:100px;
height:100px;
background:red;
-webkit-transition:height 2s;
}
div:hover
{
height:200px;
}
</style>
</head>
<body>
<div></div>
</body>
</html>
How can I reverse the transition on hover?
Try setting the bottom attribute on the div, not top:
Example: http://jsfiddle.net/lukemartin/s9jEp/