HTML连载71-翻转菜单练习

一、翻转菜单练习

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>D174_OverturnMenu</title>
    <style>
        *{
            margin:0;
            padding:0;
        }
        ul{
            width: 400px;
            height: 40px;
            margin:0 auto;
            margin-top: 100px;
            background-color: yellow;
        }
        .nav>li {
            list-style: none;
            float:left;
            width: 120px;
            height: 40px;
            margin-left:10px;
            background-color: green;
            line-height: 40px;
            text-align: center;
        }
        .sub{
            /*display: none;!*代表不显示元素*!*/
        }
        .sub>li{
            list-style: none;
            background-color: red;
            transform:rotateY(180deg);
            transition:all;
            /*opacity: 0;!*透明度,取值0-1*!*/

        }
        .nav>li:hover .sub li{
            transform:none;
        }
        .nav>li:hover .sub li:nth-child(1){
            transform:none;
            transition-delay:200ms;
        }
        .nav>li:hover .sub li:nth-child(2){
            transform:none;
            transition-delay:400ms;
        }
        .nav>li:hover .sub li:nth-child(3){
            transform:none;
            transition-delay:600ms;
        }
        .nav>li .sub li:nth-child(3){
            transform:none;
            transition-delay:200ms;
        }
        .nav>li .sub li:nth-child(2){
            transform:none;
            transition-delay:400ms;
        }
        .nav>li .sub li:nth-child(1){
            transform:none;
            transition-delay:600ms;
        }
</style>
</head>
<body>
<ul class="nav" >
    <li>一级菜单
        <ul class="sub">
            <li>二级菜单</li>
            <li>二级菜单</li>
            <li>二级菜单</li>
        </ul>
    </li>
    <li>一级菜单</li>
    <li>一级菜单</li>
</ul>
</body>
</html>

71.1
二、源码:
D174_OverturnMenu.html
D173_ShadowOfBoxAndWord.html
地址:
https://github.com/ruigege66/HTML_learning/blob/master/D174_OverturnMenu.html
https://github.com/ruigege66/HTML_learning/blob/master/D173_ShadowOfBoxAndWord.html
2.CSDN:https://blog.csdn.net/weixin_44630050
3.博客园:https://www.cnblogs.com/ruigege0000/
4.欢迎关注微信公众号:傅里叶变换,个人账号,仅用于技术交流,后台回复“礼包”获取Java大数据学习视频礼包
71.2

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值