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>

效果图

相关推荐
松涛和鸣18 小时前
49、智能电源箱项目技术栈解析
服务器·c语言·开发语言·http·html·php
加个鸡腿儿1 天前
经验分享2:SSR 项目中响应式组件的闪动陷阱与修复实践
前端·css·架构
华仔啊1 天前
写 CSS 用 px?这 3 个单位能让页面自动适配屏幕
前端·css
菩提小狗1 天前
Sqli-Labs Less-3 靶场完整解题流程解析-豆包生成
前端·css·less
智航GIS1 天前
10.5 PyQuery:jQuery 风格的 Python HTML 解析库
python·html·jquery
Pilot-HJQ1 天前
固定 Element UI 表格表头的方法(超简单)
vue.js·学习·css3·html5
web小白成长日记1 天前
CSS 作用域隔离实战:React、Vue 与 Styled Components 的三种范式
前端·css·vue.js·react.js
@@小旭2 天前
实现头部Sticky 粘性布局,并且点击菜单滑动到相应位置
前端·javascript·css
Irene19912 天前
CSS 定位属性(relative、absolute、fixed、sticky)与实用技巧总结
css
我的写法有点潮2 天前
推荐几个国外比较流行的UI库(上)
前端·javascript·css