css画一个带锯齿的票据样式

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>css画个票据的锯齿</title>
  </head>
  <style>
    body {
      background-color: green;
    }
    .cc {
      background-color: #fff;
      width: 500px;
      height: 200px;
      border-radius: 30px;
      background: radial-gradient(circle at -6% 50%, transparent 10%, #fff 4%) left, radial-gradient(circle at 106% 50%, transparent 10%, #fff 3.2%) right;
      background-size: 50% 100%;
      background-repeat: no-repeat;
    }
  </style>
  <body>
    <div class="cc"></div>
  </body>
</html>

 

posted @ 2023-03-03 19:13  刘金宇  阅读(155)  评论(0编辑  收藏  举报