Let div transitional effects code

<!DOCTYPE html>
<html>
<head>
<style>
div
{
width:100px;
height:100px;
background:blue;
transition-property:width;
transition-duration:5s;
/* Firefox 4 */
-moz-transition-property:width;
-moz-transition-duration:5s;
/* Safari and Chrome */
-webkit-transition-property:width;
-webkit-transition-duration:5s;
/* Opera */
-o-transition-property:width;
-o-transition-duration:5s;
}

div:hover
{
width:300px;
}
</style>
</head>
<body>

<div></div>

<P> Please move the mouse pointer to the blue div elements, you can see the transition effect. </ P>

<P> <b> Note: </ b> of the present embodiment is invalid in Internet Explorer. </ P>

</body>
</html>

Published an original article · won praise 0 · Views 68

Guess you like

Origin blog.csdn.net/jiehuobao/article/details/104730440