<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>transition实现的鼠标悬停淡入淡出的效果</title>
<style type="text/css">
div.wrap>div.box i{
width: 50px;
height: 50px;
background: #333;
/* display: inline-block; */
float: left;
margin: 5px;
cursor: pointer;
opacity: 0;
transition: opacity 2s;
}
.wrap{
border: 1px solid #ccc;
/* overflow: hidden; */
float: left;
}
div.wrap>div.box i:hover{
opacity: 1;
transition-duration: 0s;
}
</style>
</head>
<body>
<div class="wrap">
<div class="box">
transition实现的鼠标悬停淡入淡出的效果
最新推荐文章于 2024-01-11 20:05:40 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)