zoukankan      html  css  js  c++  java
  • css 样式代码收藏

    1.文字渐变

    color:#DBA465; background-image: linear-gradient(to bottom, #fffefc 20%, #fdd050); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    第二种实现 神器mask-image

      .gradient-text-two[data-content]::after{
                content:attr(data-content);
                display: block
                position:absolute;
                color:yellow;
                left:0;
                top:0;
                z-index:2;
                -webkit-mask-image:-webkit-gradient(linear, 0 0, 0 bottom, from(yellow), to(rgba(0, 0, 255, 0)));
            }

     
    2.边框渐变
    我自己的:
    (圆角)
    border: solid 2px transparent;//圆角按钮 去掉背景渐变产生的边框
    background-image:linear-gradient(145deg, #7C532F 12%, #953E54 99%);
    border-radius: 7.5px;

    border: solid 3px transparent;
    background-image: linear-gradient(to bottom, #ffe49b -37%, #ffc24a 116%), linear-gradient(to bottom, #ffe3a0, #db6d1e);
    background-origin: border-box;
    background-clip: content-box, border-box; 网上例子: .border-image-clip-path
    { width: 200px; height: 100px; margin: auto; border: 10px solid; border-image: linear-gradient(45deg, gold, deeppink) 1; clip-path: inset(0px round 10px);//圆角按钮的时候 这个属性裁切的不好,和里面的图片圆角没办法对齐,所以 我改成背景渐变方式实现了 animation: huerotate 6s infinite linear; filter: hue-rotate(360deg); } @keyframes huerotate { 0% { filter: hue-rotate(0deg); } 100% { filter: hue-rorate(360deg); } }

    参考文章:https://juejin.im/post/6844903972281516045

    建议收藏:https://chokcoco.github.io/CSS-Inspiration/#/

    http://css-tricks.neatbang.com/polygonLayout/#js

    https://qishaoxuan.github.io/js_tricks/cookie/

  • 相关阅读:
    JDBC
    「题解」:串串香
    「题解」:树
    「题解」:最近公共祖先
    「题解」:集合论
    「题解」:位运算
    「题解」:序列
    「总结」浅谈主席树
    $My$ $template$(持续更新)
    「题解」:毛三琛
  • 原文地址:https://www.cnblogs.com/sybboy/p/13984526.html
Copyright © 2011-2022 走看看