<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>11</title>
<style>
* {
padding: 0;
margin: 0;
}
body {
padding: 100px;
}
li {
list-style-type: none;
}
ul {
width: 600px;
height: 250px;
overflow: hidden;
}
li {
float: left;
width: 120px;
height: 250px;
-webkit-transition: width 0.5s ease-out;
-moz-transition: width 0.5s ease-out;
-ms-transition: width 0.5s ease-out;
-o-transition: width 0.5s ease-out;
transition: width 0.5s ease-out;
}
li:hover {
width: 400px;
}
ul:hover li:not(:hover) {
width: 50px;
}
</style>
</head>
<body>
<ul>
<li style="background:red">1</li>
<li style="background:green">2</li>
<li style="background:yellow">3</li>
<li style="background:blue">4</li>
<li style="background:red">5</li>
</ul>
</body>
</html>
css手风琴
最新推荐文章于 2024-07-15 23:16:45 发布