css实现6种不同渐变效果代码

代码语言:html

所属分类:布局界面

代码描述:css实现6种不同渐变效果代码

代码标签: css 渐变

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">



    <style>
        @import url("https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300&display=swap");
        body {
          height: 100vh;
          display: flex;
          justify-content: center;
          align-items: center;
          flex-wrap: wrap;
          background-color: #f5f5f5;
        }
        
        *::before {
          height: 35px;
          width: 160px;
          display: flex;
          align-items: center;
          justify-content: center;
          color: black;
          background-color: white;
          box-shadow: 0px 2px 2px #dedede;
          font-size: 11.5px;
          font-family: "Source Sans Pro", sans-serif;
          transform: translateY(150px);
        }
        
        .container {
          height: 160px;
          width: 160px;
          margin: 15px;
          border-radius: 3% 3% 0 0;
        }
        
        .linear-gradient {
          background: linear-gradient(#ff8e8e, #ffc791, #fffca3, #b8ffbf, #8fceff, #e3c2ff);
        }
        .linear-gradient::before {
          content: "Linear Gradient";
        }
        
        .linear-gradient-clr-stops {
          background: linear-gradient(#ff8e8e 0 16%, #ffc791 16% 32%, #fffca3 32% 48%, #b8ffbf 48% 64%, #8fceff 64% 82%, #e3c2ff 82%);
        }
        .linear-gradient-clr-stops::before {
          content: "Linear Gradient w/ Color Stops";
        }
        
        .radial-gradient {
          ba.........完整代码请登录后点击上方下载按钮下载查看

网友评论0