导航栏前端设计

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

最终效果

相关推荐
kyriewen6 小时前
别再 console.log 了:5 个 Chrome DevTools 调试技巧,用过就回不去了
前端·javascript·面试
IT_陈寒8 小时前
Python搞不定字符串编码?这破玩意坑我两小时!
前端·人工智能·后端
DigitalOcean9 小时前
Laravel 开发者已在 DigitalOcean 上开通超过 10 万台服务器
前端·laravel
星始流年9 小时前
从 Tool 到 Skill——基于 LangChain 的服务端Skill实现
前端·langchain·agent
李惟9 小时前
开源本地通信库,纯客户端 RPC,像聊天一样通信
前端
YAwu119 小时前
深入解析 React 炫彩鼠标跟随标题组件:从坐标定位到动画性能
前端·react.js
GuWenyue9 小时前
排序效率低?5分钟吃透快速排序,性能飙升至O(nlogn)
前端·javascript·面试
OpenTiny社区9 小时前
🎨 看完 GenUI SDK 源码我悟了!
前端·vue.js·github
叁两9 小时前
前端转型AI Agent该如何学习?(前置篇)
前端·人工智能·node.js
何时梦醒10 小时前
深入理解递归与快速排序 —— 从基础入门到手写实现
前端·javascript