导航栏前端设计

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

最终效果

相关推荐
英俊潇洒美少年7 小时前
Vue 生产环境打包:SourceMap、压缩、混淆、加密全解 + 最佳实践
前端·javascript·vue.js
巴博尔8 小时前
UNIAPP中NVUE页面 动画
android·前端·javascript·ios·uni-app
她说人狗殊途10 小时前
基于 vue-cli 创建
前端·javascript·vue.js
AZaLEan__11 小时前
前端移动端适配与 Bootstrap
前端·bootstrap·html
大家的林语冰11 小时前
Deno 2.8 正式发布,再次超越 Bun,史上最大的次版本升级诞生!
前端·javascript·node.js
渣渣xiong11 小时前
从零开始:前端转型AI agent直到就业第五十七天-第五十八天
前端·人工智能·python
AI周红伟12 小时前
周红伟:长鑫科技(CXMT)财务全景分析
前端·chrome·科技
excel12 小时前
JS 正则在多次 test() 时为什么会出现 lastIndex 缓存问题?
前端
IT_陈寒12 小时前
为什么 Java 的 Optional 让我调试到深夜?
前端·人工智能·后端
米丘12 小时前
React 19.x 的 lazy 与 Suspense
前端·javascript·react.js