CSS 圆形锯齿布局该怎么写呢?

请问这样的圆形锯齿布局该怎么写呢?
图片描述

阅读 2.5k
2 个回答
    body{
                background-color: #EDF1F7;
            }
       .box {
           width: 387px;
           height: 180px;
           padding: 10px 0;
           position: relative;
           overflow: hidden;
           border-radius: 8px;
           background: radial-gradient(rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 5px, #FFF 5px);
           background-size: 18px 15px;
           background-position: 4px -4px;
        }
       .box:before {
           content: '';
           position: absolute;
           right:0;
           left:0;
           top:10px;
           bottom:10px;
           z-index: -1;
           background-color:#FFF;
        }
       .box:after {
           content: '';
           position: absolute;
           left: 10px;
           top: 10px;
           right: 10px;
           bottom: 10px;
           box-shadow: 0 0 15px 1px rgba(0, 0, 0, 0.5);
           z-index: -2;
        }
        
          <div class="box">
                   
            </div>
新手上路,请多包涵

这种样式直接使用图片来处理不是更简单吗,用css3有点求虐了吧

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题