导航栏前端设计

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

最终效果

相关推荐
韩立学长1 小时前
【开题答辩实录分享】以《基于Vue的非遗文化知识分享平台的设计与实现》为例进行选题答辩实录分享
前端·javascript·vue.js
优弧1 小时前
离开舒适区100天,我后悔了吗?
前端·后端·面试
胡gh1 小时前
css的臂膀,前端动效的利器,还是布局的“隐形陷阱”?
前端·css·html
灵感菇_2 小时前
Flutter Riverpod 完整教程:从入门到实战
前端·flutter·ui·状态管理
用户21411832636022 小时前
紧急修复!Dify CVE-2025-55182 高危漏洞,手把手教你升级避坑
前端
Vic101012 小时前
解决 Spring Security 在异步线程中用户信息丢失的问题
java·前端·spring
wordbaby3 小时前
Expo (React Native) 最佳实践:TanStack Query 深度集成指南
前端·react native
~无忧花开~3 小时前
Vue二级弹窗关闭错误解决指南
开发语言·前端·javascript·vue.js
软件技术NINI3 小时前
前端面试题:请描述一下你对盒模型的理解
前端
码事漫谈3 小时前
VS Code终端从入门到精通完全指南
前端·后端