导航栏前端设计

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;/*规定大小*/
}

最终效果

相关推荐
瑶瑶领先_11 小时前
js 数字精确度
前端
瑶瑶领先_11 小时前
图片标签拖拽 && url、base64、Blob、File、canvas之间相互转换
前端
感性的程序员小王12 小时前
我做了个 AI + 实时协作 的 draw.io,免费开源!!
前端·后端
_周游12 小时前
Java8 API文档搜索引擎_7.项目优化之权重合并
java·开发语言·前端·搜索引擎·intellij-idea
木斯佳12 小时前
前端八股文面经大全:2026-02-09快手春招前端一面
前端·状态模式
闲云一鹤12 小时前
UV 包管理器 - 新一代的 Python 包和环境管理神器
前端·python
电商API_1800790524712 小时前
淘宝商品详情数据获取全方案分享
开发语言·前端·javascript
Amumu1213813 小时前
CSS简介
前端·css
Yzw13 小时前
当vue.diff遇上了扩展运算符(...)
前端
前端不开发13 小时前
在任意网页里“召唤”一个火柴人:一次有趣的 JavaScript Hack
前端·javascript