Lewiskycc
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
<div class="background-box"></div>
<div class="border-box"></div>
</body>
</html>
<style>
/* 背景图片实现 */
.background-box  {
  width: 400px;
  height: 100px;
  /* 透明色替换为当前背景底色 */
  background:linear-gradient(-135deg, transparent 50px, red , yellow) top right;
  background-size: 50% 50%;
  background-repeat: no-repeat;
}
/* 边框实现 */
.border-box {
  width: 100px;
  height: 50px;
  background: linear-gradient(#e66465, #9198e5);
  position: relative;
}
.border-box::after {
    position: absolute;
    content: "";
    right: 0;
    top: 0,
    width: 0;
    height: 0;
    border-bottom: 50px solid transparent;
    border-right: 50px solid #FFF;  /*颜色替换为当前卡片底色*/
    border-left: 50px solid transparent;
}
</style>

分类:

技术点:

相关文章:

  • 2021-08-25
  • 2021-07-10
  • 2021-08-07
  • 2021-10-15
  • 2021-12-13
  • 2021-10-26
  • 2021-12-05
  • 2021-09-16
猜你喜欢
  • 2021-12-24
  • 2021-08-07
  • 2021-04-07
  • 2021-12-29
  • 2021-12-29
  • 2021-12-09
  • 2021-10-09
相关资源
相似解决方案