Transitioning on hover effect in CSS3

<!DOCTYPE html>
<html>
<head>
<title>Transitioning on hover effect</title>

<style>
#square
{
position :absolute;
top :50px;
left :50px;
width :100px;
height :100px;
padding :2px;
text-align :center;
border-width :1px;
border-style :solid;
background :orange;
transition :all .8s ease-in-out;
-moz-transition :all .8s ease-in-out;
-webkit-transition:all .8s ease-in-out;
-o-transition :all .8s ease-in-out;
-ms-transition :all .8s ease-in-out;
}

#square:hover
{
background :yellow;
-moz-transform :rotate(360deg);
-webkit-transform :rotate(360deg);
-o-transform :rotate(360deg);
-ms-transform :rotate(360deg);
transform :rotate(360deg);
}
</style>
</head>
<body>
<div id='square'>
Square shape<br>
created using<br>
a simple div<br>
element with<br>
a 1px border
</div>
</body>
</html>

Comments

Popular posts from this blog

Shutdown Computer With Funny Reason

Hidden Attribute in javascript

Draw animated loading spinner canvas in Javascript