代码 手机导航效果

2024-11-19 07:53:16 +0800 CST views 927
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0 ">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>drop-down</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        body{
            background: #66CCCC;
            padding: 40px 0;
            text-align: center;
        }
        .ribbon{
            display: inline-block;
        }
        .ribbon::before{
            margin-top: 8px;
            content: "";
            border: 24px solid #333;
            border-left-color: transparent;
            float: left;
        }
        .ribbon::after{
            margin-top: 8px;
            content: "";
            border: 24px solid #333;
            border-right-color: transparent;
            float: left;
        }
        a{
            float: left;
            height: 56px;
            text-decoration: none;
            overflow: hidden;
        }
        span{
            margin-top: 8px;
            color: #fff;
            line-height:48px;
            padding: 0 16px;
            background: #333;
            display: inline-block;
            position: relative;
            transition: all 0.3s;
        }
        a:hover span{
            margin-top: 0;
            background: #666699;
        }
        span::before{
            content: "";
            position: absolute;
            top: 48px;
            left: 0;
            border-right: 8px solid #666699;
            border-bottom: 8px solid #333;
        }
        span::after{
            content: "";
            position: absolute;
            top:48px;
            right: 0;
            border-left: 8px solid #666699;
            border-bottom: 8px solid #333;
        }
</style>
</head>
<body>
    <div class="ribbon">
        <a href="#"><span>Home</span></a>
        <a href="#"><span>About</span></a>
        <a href="#"><span>Services</span></a>
        <a href="#"><span>Contact</span></a>
    </div>
    <div style="clear:both;"></div>
</body>
</html>

images

复制全文 生成海报 网页开发 前端设计 用户界面

推荐文章

跟着 IP 地址,我能找到你家不?
2024-11-18 12:12:54 +0800 CST
Vue3中如何处理组件间的动画?
2024-11-17 04:54:49 +0800 CST
10个几乎无人使用的罕见HTML标签
2024-11-18 21:44:46 +0800 CST
避免 Go 语言中的接口污染
2024-11-19 05:20:53 +0800 CST
Vue 中如何处理跨组件通信?
2024-11-17 15:59:54 +0800 CST
html流光登陆页面
2024-11-18 15:36:18 +0800 CST
Vue3中的v-bind指令有什么新特性?
2024-11-18 14:58:47 +0800 CST
Golang在整洁架构中优雅使用事务
2024-11-18 19:26:04 +0800 CST
PHP openssl 生成公私钥匙
2024-11-17 05:00:37 +0800 CST
MySQL数据库的36条军规
2024-11-18 16:46:25 +0800 CST
支付宝批量转账
2024-11-18 20:26:17 +0800 CST
WebSocket在消息推送中的应用代码
2024-11-18 21:46:05 +0800 CST
Vue3中如何实现插件?
2024-11-18 04:27:04 +0800 CST
解决 PHP 中的 HTTP 请求超时问题
2024-11-19 09:10:35 +0800 CST
LLM驱动的强大网络爬虫工具
2024-11-19 07:37:07 +0800 CST
程序员茄子在线接单