html和css写QQ会员页面导航

目录

1、css代码

2、html代码

效果图


1、css代码

css 复制代码
<style>
        * {
            padding: 0;
            margin: 0;
            list-style: none;
            text-decoration: none;
        }

        div {
            margin: 30px auto;
        }

        li {
            float: left;
            height: 60px;
            background-color: rgb(102, 102, 102);
            line-height: 40px;

        }

        img {
            height: 100%;
            margin-right: 40px;
            margin-left: 40px;
        }

        a {
            display: block;
            height: 40px;
            text-align: center;
            color: white;
            margin-top: 15px;
            margin-right: 30px;
            font-size: 12px;
        }

        a:hover {
            color: rgb(20, 20, 224);
        }

        .login {
            border: 1px solid rgb(192, 170, 96);
            width: 70px;
            height: 30px;
            border-bottom-left-radius: 15px;
            border-top-left-radius: 15px;
            border-bottom-right-radius: 15px;
            border-top-right-radius: 15px;
            color: rgb(192, 170, 96);
            margin-top: 20px;
            line-height: 30px;
            font-size: 14px;

        }

        .huiyuan {
            width: 120px;
            height: 30px;
            background-color: rgb(250, 214, 92);
            border-bottom-left-radius: 15px;
            border-top-left-radius: 15px;
            border-bottom-right-radius: 15px;
            border-top-right-radius: 15px;
            color: rgb(161, 115, 19);
            font-weight: 700;
            margin-top: 20px;
            line-height: 30px;
            margin-left: -26px;

        }

        .login:hover {
            color: rgb(192, 170, 96);

        }

        .huiyuan:hover {
            color: rgb(161, 115, 19);

        }

    
    </style>

2、html代码

html 复制代码
<div>
        <ul>
            <li><img src="./img/logo.png" alt=""></li>
            <li><a href="">功能特权</a></li>
            <li><a href="">游戏特权</a></li>
            <li><a href="">生活特权</a></li>
            <li><a href="">会员活动</a></li>
            <li><a href="">成长体系</a></li>
            <li><a href="">年费专区</a></li>
            <li><a href="">超级会员</a></li>
            <li><a href="" class="login">登录</a></li>
            <li><a href="" class="huiyuan">开通超级会员</a></li>
        </ul>

    </div>

效果图

相关推荐
weixin_4277716144 分钟前
css加载顺序导致本地和线上样式不一致
前端·css
ZC跨境爬虫8 小时前
跟着 MDN 学CSS day_41:显式轨道、隐式网格与区域命名放置
前端·javascript·css·ui·交互
小KK_14 小时前
CSS浮动布局指南:从文档流到BFC
前端·css·html
Oo92015 小时前
从零搭建一个微信风格页面——BEM 命名、CSS Reset 与 WeUI 按钮实战
html
半个落月17 小时前
前端工程化第一步:BEM 国际命名规范与 CSS Reset 实战
前端·css
XZ-07000117 小时前
MySQL-综合应用(Python+Html)
python·mysql·html
Darling噜啦啦18 小时前
BEM 命名规范 + CSS Reset 实战:从微信按钮页面看专业前端开发
前端·css·代码规范
To_OC18 小时前
写完这个微信风格按钮页面,我终于吃透了BEM命名+CSS重置
前端·css·html
专注VB编程开发20年19 小时前
python翻译网页HTML的难题
python·c#·html
ZC跨境爬虫20 小时前
跟着 MDN 学CSS day_44:响应式设计——让网页适配所有屏幕的完整指南
前端·css·ui·html·tensorflow