zoukankan      html  css  js  c++  java
  • css+div实现各种常见边框

    css+div实现各种常见边框

    一、效果图如下

    二、实现代码

    div {
          width: 120px;
          height: 100px;
          margin: 10px;
          float: left;
          text-align: center;
          line-height: 100px;
          font-size: 18px;
          color: #999999;
          border: 4px solid #797979;
        }
    
        .rounded {
          border-radius: 30px;
        }
    
        .asymmetric-radius {
          border-radius: 30px / 90px;
        }
    
        .percentages {
          border-radius: 50%;
        }
    
        .brackets {
          border-top: none;
          border-bottom: none;
          border-radius: 30px / 90px;
        }
    
        .inner-brackets {
          border-top: none;
          border-bottom: none;
          border-radius: 20px / 70px;
        }
    
        span {
          width: 100px;
          height: 90px;
          margin: 7px;
          float: left;
          border: 4px solid #797979;
          font-size: 18px;
          color: #797979;
        }
    
        .squarebrackets {
          border: none;
          position: relative;
          width: 200px;
          height: 100px;
          padding: 0;
          margin: 1em;
        }
    
        .squarebrackets:before,
        .squarebrackets:after {
          content: '';
          display: block;
          height: 100%;
          width: 15px;
          border: 4px solid #797979;
          position: absolute;
          top: -5px;
        }
    
        .squarebrackets:before {
          left: 0;
          border-right: 0;
        }
    
        .squarebrackets:after {
          right: 0;
          border-left: 0;
        }

    三、完整代码

    完整代码示例下载

    让每一天过的有意义!
  • 相关阅读:
    HLS、RTSP、RTMP
    浏览器自定义协议
    CMD窗口设置代理
    Win10性能提升设置
    MongoDB
    PMP考位抢夺攻略(二)
    PMP考位抢夺攻略!
    AES php java 互转
    分解uber依赖注入库dig-源码分析
    分解uber依赖注入库dig-使用篇
  • 原文地址:https://www.cnblogs.com/BillyYoung/p/14513471.html
Copyright © 2011-2022 走看看