html5 css折疊導航欄


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>旋轉菜單</title>
    <link rel="stylesheet" href="style8.css" type="text/css">
</head>
<body>
<div class="se">
<h3><a href="">IT</a></h3>
<div><img src="imges/it.jpg" alt=""></div>    
</div>

<div class="se">
<h3><a href="">創投</a></h3>
<div><img src="imges/kk.jpg" alt=""></div>    
</div>

<div class="se">
<h3><a href="">探索</a></h3>
<div><img src="imges/dd.jpg" alt=""></div>    
</div>
</body>
</html>

 

img{
    width: 500px;
    height: 345px;
}
*{
    margin: 0;
    padding: 0;

}
h3+div{
    height: 0px;
    overflow: hidden;
    transform: all 1s ease;
}
a{
    text-decoration: none;
}
.se{
    width: 300px;
    background: rgba(180,60,30,0.3);
    margin-top: 5px;
    margin-left: 20px;
    float: left;
}
h3{
    background: rgba(180,80,30,0.8);
    padding: 5px 25px;
    border-radius: 20px;
}
.se:hover h3+div{
height: 345px;
overflow: auto;
}


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM