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>

效果图

相关推荐
小赵同学WoW13 小时前
CSS作用域穿透选择器
前端·css
逆光如雪14 小时前
移动端border-left 和 width:1px,同样写1px为什么粗细不同?
前端·css
|晴 天|15 小时前
从零打造现代化个人博客:Vue 3 + TypeScript + Element Plus 完整实战
javascript·css·chrome·typescript·html5·webstorm
05Nuyoah17 小时前
CSS文本和字体属性,列表属性
javascript·css·css3
Rabbit码工18 小时前
HTML5 与 CSS3 新特性全解析:从结构优化到视觉升级
前端·css·css3·html5
王美丽1.8518 小时前
css3选择器
前端·css·css3
噜噜薯18 小时前
HTML5和CSS3的核心新增特性及其语法
前端·css3·html5
王铁柱66618 小时前
使用css3如何对动画进行延时操作?
前端·css·css3
海风总是软软的18 小时前
CSS3伪类选择器详解
前端·css3
Tisfy18 小时前
CORS 跨域重定向后 Origin 变 null —— 一次 Nginx 字体加载失败的排查记录
运维·nginx·html·cors