导航栏前端设计

html:

html 复制代码
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="test.css">
    <title>导航栏</title>
</head>

<body>

        <table>
            <tr>
                <td><a href="https://www.baidu.com/">百度一下</a></td>
                <td><a href="https://www.bilibili.com/">哔哩哔哩</a></td>
                <td><a href="https://www.yikm.net/">小霸王</a></td>
                <td><a href="https://www.shodan.io/">搜搜看</a></td>
                <td><a href="https://forum.ywhack.com/">菱角</a></td>
                <td><a href="https://www.crazygames.com/">精彩小游戏</a></td>
            </tr>
        </table>
   
</body>
</html>

css:

css 复制代码
table tr td a:hover{    /*hover代表伪类当鼠标悬停时生效*/
    background-color:darkred; /*底色*/
    color: aliceblue;/*内容颜色*/
    border-color: red;/*边线颜色*/
    border-width: 5px;/*边线粗细*/
}
table{
    background-color:darkblue;
    color: aliceblue;
    border-radius: 10px;
    letter-spacing:5px;
    width: 1000px;/*长度*/
    margin-right: auto;/*设定table在页面中的位置 为自动*/
    margin-left: auto;
    font-weight: 990;/*字体粗细*/
}
a{
    color: aliceblue;
    text-decoration:none;/*去除下划线*/
}
table td{
    padding:15px;/*规定大小*/
}

最终效果

相关推荐
前端李易安2 小时前
Web常见的攻击方式及防御方法
前端
PythonFun2 小时前
Python技巧:如何避免数据输入类型错误
前端·python
hakesashou2 小时前
python交互式命令时如何清除
java·前端·python
天涯学馆2 小时前
Next.js与NextAuth:身份验证实践
前端·javascript·next.js
HEX9CF2 小时前
【CTF Web】Pikachu xss之href输出 Writeup(GET请求+反射型XSS+javascript:伪协议绕过)
开发语言·前端·javascript·安全·网络安全·ecmascript·xss
ConardLi2 小时前
Chrome:新的滚动捕捉事件助你实现更丝滑的动画效果!
前端·javascript·浏览器
ConardLi3 小时前
安全赋值运算符,新的 JavaScript 提案让你告别 trycatch !
前端·javascript
凌云行者3 小时前
使用rust写一个Web服务器——单线程版本
服务器·前端·rust
华农第一蒟蒻3 小时前
Java中JWT(JSON Web Token)的运用
java·前端·spring boot·json·token
积水成江3 小时前
关于Generator,async 和 await的介绍
前端·javascript·vue.js