We would like to know how to hover to indent list item animation.
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
ul {<!--from w ww .j a va 2 s .c o m-->
list-style-type: none;
margin: 0;
}
li {
margin-left: -25px;
padding: 10px;
background-color: #EEE;
margin-bottom: 5px;
}
li:hover {
margin-left: -20px;
background-color: #AAA;
color: white;
transition: all 300ms ease;
-moz-transition: all 300ms ease;
-webkit-transition: all 300ms ease;
-o-transition: all 300ms ease;
}
</style>
</head>
<body>
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
<li>Item 5</li>
</ul>
</body>
</html>
The code above is rendered as follows: