zoukankan      html  css  js  c++  java
  • css实现栏目两边斜线的效果

    实现效果:

    具体实现代码:

    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title></title>
            <style>
                .wrapper {
                    text-align: center;
                    border-top: 1px solid #eee;
                    margin-top: 50px;
                }
                .tabs {
                    display: inline-block;
                    text-align: center;
                    border-bottom: solid 1px #eee;
                    background: #fff;
                    margin-top: -1px;
                    padding: 0 64px;
                    position: relative;
                }
                .tabs > a {
                    display: inline-block;
                    line-height: 44px;
                    color: #aaaaaa;
                    font-size: 14px;
                    font-weight: bold;
                    letter-spacing: 1px;
                    text-decoration: none;
                    padding: 0 26px;
                    position: relative;
                }
                .tabs .left-line {
                    content: "";
                    position: absolute;
                    top: 0px;
                    left: -1px;
                    bottom: 0;
                    border-top: 45px solid transparent;
                    border-left: 45px solid #eee;
                }
                .tabs .left-line:before {
                    content: "";
                    position: absolute;
                    left: -48px;
                    bottom: 0;
                    border-top: 45px solid transparent;
                    border-left: 45px solid #fff;
                }
                
                .tabs .right-line {
                    position: absolute;
                    right: -1px;
                    top: 0;
                    border-bottom: 45px solid #eee;
                    border-left: 45px solid transparent;
                    content: "";
                }
                .tabs .right-line:before {
                    position: absolute;
                    right: -2px;
                    top: 0;
                    border-bottom: 45px solid white;
                    border-left: 45px solid transparent;
                    content: "";
                }
            </style>
        </head>
        <body>
            <div class="wrapper">
                <div class="tabs">
                    <span class="left-line"></span>
                    <a href="javascript:;" >栏目一</a>
                    <a href="javascript:;" >栏目二</a>
                    <span class="right-line"></span>
                </div>
            </div>
        </body>
    </html>
  • 相关阅读:
    编译 | 更新标准库_交叉编译工具链
    论文 | 图文_学科
    编码 | 二进制格式设计方案
    图片 | 图片上传管理
    进程 | 查询进程中包含多少线程
    第二周02:Fusion ICP逐帧融合
    exe文件当前目录搜索文件
    第一周:读取XML深度数据并将其重建为三维点云
    第二周:01 ICP迭代交互
    C++文件读写(转载)
  • 原文地址:https://www.cnblogs.com/stella1024/p/9145107.html
Copyright © 2011-2022 走看看