zoukankan      html  css  js  c++  java
  • CSS实现不规则图形,填充渐变色

    <!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  {
       400px;
      height: 100px;
      /* 透明色替换为当前背景底色 */
      background:linear-gradient(-135deg, transparent 50px, red , yellow) top right;
      background-size: 50% 50%;
      background-repeat: no-repeat;
    }
    /* 边框实现 */
    .border-box {
       100px;
      height: 50px;
      background: linear-gradient(#e66465, #9198e5);
      position: relative;
    }
    .border-box::after {
        position: absolute;
        content: "";
        right: 0;
        top: 0,
         0;
        height: 0;
        border-bottom: 50px solid transparent;
        border-right: 50px solid #FFF;  /*颜色替换为当前卡片底色*/
        border-left: 50px solid transparent;
    }
    </style>
    
  • 相关阅读:
    docker (2) 私有仓库的建立
    golang (5) http 请求分析
    java (1)
    golang (5) ---工程管理
    Mac使用一些经验
    数组的遍历
    进制
    数组的初始化
    数组基本概念
    博客开始更新第一天
  • 原文地址:https://www.cnblogs.com/Lewiskycc/p/12809139.html
Copyright © 2011-2022 走看看