<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
*{
padding: 0;
margin: 0;
}
ul{
width: 800px;
height: 400px;
background: yellow;
margin: 0 auto;
}
li{
float: left;
list-style: none;
width: 200px;
height: 400px;
overflow: hidden;
}
.spring{
background: green;
}
.summer{
background: red;
}
.autumn{
background: black;
}
.winter{
background: blue;
}
p{
color: white;
text-align: center;
text-indent: 2em;
line-height: 2;
}
h3{
color: white;
text-align: center;
line-height: 50px;
}
ul:hover li{
width: 50px;
}
ul:hover li:hover{
width: 650px;
}
ul:hover p{
display: none;
}
ul:hover h3{
display: none;
}
ul:hover li:hover p{
display: block;
}
ul:hover li:hover h3{
display: block;
}
</style>
</head>
<
初学HTML5——手风琴样式
最新推荐文章于 2024-03-30 08:58:24 发布