首页 > Web开发 > 详细

css 四个角

时间:2020-06-11 16:02:19      阅读:37      评论:0      收藏:0      [点我收藏+]
<style>
    .outter {
      position: relative;
      padding: 5px;
      height: 50px; 
      width: 300px;
    }
    .outter::before {
      position: absolute;
      content: ‘‘;
      height: 10px;
      width: 10px;
      right: 0;
      top: 0;
      border-right: 1px solid #00E8FF;
      border-top: 1px solid #00E8FF;
    }
    .outter::after {
        position: absolute;
        content: ‘‘;
        height: 10px;
        width: 10px;
        left: 0;
        bottom: 0;
        border-left: 1px solid #00E8FF;
        border-bottom: 1px solid #00E8FF;
    }
    .content {
        position: relative;
        height: 50px;
    }
    .content::before {
      position: absolute;
      content: ‘‘;
      height: 10px;
      width: 10px;
        left: -5px;
        top: -5px;
        border-left: 1px solid #00E8FF;
        border-top: 1px solid #00E8FF;
    }
    .content::after {
      position: absolute;
      content: ‘‘;
      height: 10px;
      width: 10px;
        right: -5px;
        bottom: 5px;
        border-right: 1px solid #00E8FF;
        border-bottom: 1px solid #00E8FF;
    }
   
  </style>
 
 
<div class="outter">
      <div class="content">

      </div>
      
  </div>

css 四个角

原文:https://www.cnblogs.com/zjpzjp/p/13093643.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!