代码 手机导航效果

2024-11-19 07:53:16 +0800 CST views 894
<!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

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

推荐文章

程序员出海搞钱工具库
2024-11-18 22:16:19 +0800 CST
Vue3中如何处理WebSocket通信?
2024-11-19 09:50:58 +0800 CST
Nginx 防盗链配置
2024-11-19 07:52:58 +0800 CST
Vue中如何处理异步更新DOM?
2024-11-18 22:38:53 +0800 CST
Vue3中如何实现状态管理?
2024-11-19 09:40:30 +0800 CST
js生成器函数
2024-11-18 15:21:08 +0800 CST
开发外贸客户的推荐网站
2024-11-17 04:44:05 +0800 CST
JavaScript 策略模式
2024-11-19 07:34:29 +0800 CST
Elasticsearch 的索引操作
2024-11-19 03:41:41 +0800 CST
Elasticsearch 监控和警报
2024-11-19 10:02:29 +0800 CST
rangeSlider进度条滑块
2024-11-19 06:49:50 +0800 CST
Shell 里给变量赋值为多行文本
2024-11-18 20:25:45 +0800 CST
Manticore Search:高性能的搜索引擎
2024-11-19 03:43:32 +0800 CST
Hypothesis是一个强大的Python测试库
2024-11-19 04:31:30 +0800 CST
git使用笔记
2024-11-18 18:17:44 +0800 CST
程序员茄子在线接单