CSS延迟hover显示时间

时间:2020-12-14 13:01:14   收藏:0   阅读:6
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<style>
    div{
        transition: 0s background-color;
    }
    div:hover{
        background-color:red;    
        transition-delay:3s;
    }
</style>
<div>延迟hover显示时间(鼠标悬停此处,3秒后显示红色背景)</div>
</body>
</html>

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!