再次修改导航样式,看看哪个好看

Right Here Waiting

<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        .main {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            .back {
                position: absolute;
                width: 25em;
                height: 4.8em;
                border-radius: 10px;
                box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 2px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -1px 0px inset;
                background-color: #171717;
                z-index: -1;
            }
            .switch {
                display: block;
                position: relative;
                background-color: black;
                width: 84px;
                height: 54px;
                box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.2), 0 0 1px 2px black,
                    inset 0 2px 2px -2px white, inset 0 0 2px 5px #47434c,
                    inset 0 0 2px 22px black;
                border-radius: 10px;
                padding: 20px;
                margin: 5px;
                a {
                    position: absolute;
                    top: 5px;
                    left: 10px;
                    color: rgb(255, 255, 255);
                    text-decoration: none;
                    /* 字体模糊 */
                    filter: blur(2px);
                    font-size: 2em;
                    text-align: center;
                    z-index: 1;
                }
                input {
                    display: none;
                    &:checked+.button .light {
                        animation: flicker 0.2s infinite 0.3s;
                    }
                    &:checked+.button .shine {
                        opacity: 1;
                    }
                    &input:checked+.button .shadow {
                        opacity: 0;
                    }
                }
                .button {
                    /* transition: all 0.3s cubic-bezier(1, 0, 1, 1); */
                    width: 73px;
                    height: 43px;
                    border-radius: 5px;
                    position: relative;
                    left: -0.9em;
                    top: -0.9em;
                    cursor: pointer;
                }
                .light {
                    opacity: 0;
                    animation: light-off 1s;
                    position: absolute;
                    width: 100%;
                    height: 100%;
                    color: rgb(255, 255, 255);
                    text-shadow: 1px 1px 2px #000000;
                    font-size: 2em;
                    font-weight: bold;
                    text-align: center;
                }
                .dots {
                    position: absolute;
                    width: 100%;
                    height: 100%;
                    background-size: 10px 10px;
                    border-radius: 5px;
                }
            }
        }
        .switch1 {
            .button {
                background-color: #9b0621;
            }
            .light {
                background-image: radial-gradient(#ffc97e, #ff1818 40%, transparent 70%);
            }
            .dots {
                background-image: radial-gradient(transparent 30%, rgba(101, 0, 0, 0.653) 70%);
            }
            input:checked+.button {
                box-shadow: 0 0px 20px #f30404;
            }
        }
        @keyframes flicker {
            0% {
                opacity: 1;
            }
            80% {
                opacity: 0.8;
            }
            100% {
                opacity: 1;
            }
        }
        @keyframes light-off {
            0% {
                opacity: 1;
            }
            80% {
                opacity: 0;
            }
        }
        .switch2 {
            .button {
                background-color: #949207;
            }
            .light {
                background-image: radial-gradient(#f6ff7e, #eeff00 40%, transparent 70%);
            }
            .dots {
                background-image: radial-gradient(transparent 30%, rgba(91, 101, 0, 0.7) 70%);
            }
            input:checked+.button {
                box-shadow: 0 0px 20px #faf60c;
            }
        }
        .switch3 {
            .button {
                background-color: #2f9407;
            }
            .light {
                background-image: radial-gradient(#f6ff7e, #00ff00 40%, transparent 70%);
            }
            .dots {
                background-image: radial-gradient(transparent 30%, rgba(0, 101, 13, 0.7) 70%);
            }
            input:checked+.button {
                box-shadow: 0 0px 20px #52ff0e;
            }
        }
        .switch4 {
            .button {
                background-color: #8d849a;
            }
            .light {
                background-image: radial-gradient(#ffc97e, #ecdefd 40%, transparent 70%);
            }
            .dots {
                background-image: radial-gradient(transparent 30%, #423e4771 70%);
            }
            input:checked+.button {
                box-shadow: 0 0px 20px #ffffff;
            }
        }
        .switch .shine {
            border-radius: 5px;
            transition: all 0.3s cubic-bezier(1, 0, 1, 1);
            opacity: 0.3;
            position: absolute;
            width: 100%;
            height: 100%;
            background: linear-gradient(white, transparent 3%) 50% 50%/97% 97%,
                linear-gradient(rgba(255, 255, 255, 0.5),
                    transparent 50%,
                    transparent 80%,
                    rgba(255, 255, 255, 0.5)) 50% 50%/97% 97%;
            background-repeat: no-repeat;
        }
    </style>
</head>
<body>
    <div class="main">
        <div class="back"></div>
        <label class="switch switch1">
            <a href="#">首页</a>
            <input checked="" type="radio" name="value-radio">
            <div class="button">
                <div class="light">首页</div>
                <div class="dots"></div>
                <!-- <div class="characters"></div> -->
                <div class="shine"></div>
            </div>
        </label>
        <label class="switch2 switch">
            <a href="#">学习</a>
            <input type="radio" name="value-radio">
            <div class="button">
                <div class="light">学习</div>
                <div class="dots"></div>
                <div class="characters"></div>
                <div class="shine"></div>
            </div>
        </label>
        <label class="switch3   switch">
            <a href="#">学习</a>
            <input type="radio" name="value-radio">
            <div class="button">
                <div class="light">学习</div>
                <div class="dots"></div>
                <div class="characters"></div>
                <div class="shine"></div>
            </div>
        </label>
        <label class="switch4 switch">
            <a href="#">关于</a>
            <input type="radio" name="value-radio">
            <div class="button">
                <div class="light">关于</div>
                <div class="dots"></div>
                <!-- <div class="characters"></div> -->
                <div class="shine"></div>
            </div>
        </label>
    </div>
</body>
</html>

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
这是一款最新完整仿hao123带后台网址导航,该源码实现高仿了前几段的hao123网址导航源码,该源码也比较简单,非常适合一些朋友的使用,喜欢做网址导航的朋友可以下载学习看看。 2013-8-4 再次同步hao123模板 2013-8-4 增加实用查询工具条 2013-8-4 增加在线电视TV功能 2013-6-22 再次同步hao123模板 2013-6-22 修改了左侧新闻和样式 2013-4-5 增加了发现惊奇。 2013-4-5 修复了开心漫画点击不会跳出页面。 2013-4-5 修复了有趣的小玩意点击不会跳出页面。 2013-4-5 增加轻松一刻及广告内容 2013-4-5 增加话费充值条 2013-4-5 同步hao123最新分类,更新最近站点。 2012-10-20 QQ1群满,请加新群196193365 2012-10-20 重新整理分类,使其更美观。 2012-10-20 修正163邮箱不安全登陆的提示。 2012-10-20 修正天气预报不能自动定位的问题。 2012-10-20 增加四种风格选择按钮,用户名自选风格。 2012-10-20 左侧调整热点新闻、增加热门影视。 2012-10-20 增加电影频道、电视剧频道在线观看。 2012-10-20 修正IE8顶部错位问题 2012-10-20 修正左侧新闻BUG。 2012-7-13 增加在线网址提交功能 2012-7-13 增加在线反馈提交功能 2012-7-13 开放留言簿使用 2012-7-13 开放域名展示系统 2012-7-13 与网址家园wz123.net同步数据 2012-7-13 最新同步wz123.net清新绿风格。 2012-5-16 增加站长统计程序及图标。 2012-5-16 美化界面。 2012-5-16 增加最新新闻资讯。 2012-5-16 修正后台管理全局设置不能保存BUG。 2012-4-9 增加IP购买页面。 2012-4-9 增加分享工具条。 2012-4-9 支持二级目录,为站长节省空间 2012-2-27 再次与123同步 2011-11-7 新增折扣分类。 2011-10-24 同步wz123.net首页时间、天气的显示方式。 2011-10-14 新增实用工具、彩票、音乐、小游戏聚合分类。 2011-9-30 重新整理了分类。 2011-5-8 增加电影分类,自动调用wz123.net电影数据。修复军事、旅游、酷站链接名。 2011-4-2 增加连续剧分类,自动调用wz123.net连续剧数据。 2011-4-1 改进天气自动调用weather.com.cn数据。 2010-3-5 应广大站长需要,再次提供HTML版本下载,下载地址 http://www.wz123.net/gbook 2010-1-15 同步wz123.net分类顺序,最新更新wz123.net职业与爱好分类。 2010-1-11 最新修复网站放在子目录上栏目页样式问题,有此问题的用户请下载最新版覆盖修复。 如遇到bug或操作上的问题请发邮件至:wz123s@163.com 网址导航技术/wz123运营QQ群: 196193365 网址运营交流,wz123.net QQ群:184914448 ,最新源码发布请到 http://www.wz123.net/gbook下载 QQ:645003573 通常一到两个工作日回复。 最新完整仿hao123带后台网址导航 v6.0 后台管理地址:您的网址 /admin 默认用户: admin 默认密码: wz123.net

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值