首页 > Web开发 > 详细

css3 鼠标经过颜色渐变

时间:2015-01-28 17:48:33      阅读:362      评论:0      收藏:0      [点我收藏+]

 

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
*{
    margin: 0;
    padding: 0;
}
.hover {
    width: 500px;
    height: 500px;
    background-color: red;
    -webkit-transition: all 0.5s linear;
    -moz-transition: all 0.5s linear;
    -o-transition: all 0.5s linear;
    transition: all 0.5s linear;
}
.hover:hover, .hover:focus, .hover:active {
    -webkit-transition: all 0.5s linear;
    -moz-transition: all 0.5s linear;
    -o-transition: all 0.5s linear;
    transition: all 0.5s linear;
    background-color: #000;
}

</style>
</head>
<body>
    <div class="hover"></div>
</body>
</html>

 

效果:鼠标经过颜色的变化有一个过渡,会比较好看。

css3 鼠标经过颜色渐变

原文:http://www.cnblogs.com/baixc/p/4256363.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!