css 背景 弧度效果--卡片样式


<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<style>
  .card-wrap {
    width: 100%;
    height: 188px;
    position: relative;
    z-index: -1;
    overflow: hidden;
  }

  .card-wrap:after {
    width: 140%;
    height: 168px;
    position: absolute;
    left: -20%;
    top: 0;
    z-index: -1;
    content: '';
    border-radius: 0 0 50% 50%;
    background: linear-gradient(144deg, #3c9cef 0%, #5f6bfd 100%);
  }

  .card-box {
    position: absolute;
    bottom: 10px;
    width: 100%;

  }

  .card-info {
    margin: auto;
    width: 92%;
    height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    box-shadow: 0 4px 8px 0 rgba(190, 195, 199, 0.5);
    border-radius: 8px;
  }
</style>

<body>
  <div class="card-wrap">
    <div class="card-box">
      <div class="card-info">content</div>
    </div>
  </div>

</body>

</html>


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM