• css3 mask 渐变动画另类写法


    css mask 渐变动画另类写法  就是改变宽度做动画 里面渐变写死

        html,
        body {
          margin: 0;
          padding: 0;
        }
        .rect {
          height: 10px;
           100vw;
          background-image: linear-gradient(to right, #000 80%, #fff);
        }
        .mask {
          -webkit-mask-image: linear-gradient(
            to right,
            rgba(0, 0, 0, 1) 80%,
            transparent
          );
          mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 80%, transparent);
        }
        html {
          font-size: 14px;
          line-height: 3;
          font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
            Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
        }
        .tab-wrap {
          padding: 0 2em 0 1em;
          position: relative;
           300px;
          /* height: 12px; */
          border-radius: 6px 6px 0 0;
          background-color: #333333;
          overflow: hidden;
          display: flex;
          justify-content: center;
          align-items: center;
          color: rgba(255, 255, 255, 0.8);
          display: inline-block;
        }
        .tab-wrap .tab {
           100%;
          overflow: hidden;
          text-overflow: ellipsis;
        }
        .tab .tab-text {
          white-space: nowrap;
        }
        .tab-wrap .close {
          position: absolute;
          right: 0;
           2em;
          top: 0;
          height: 100%;
          display: flex;
          align-items: center;
          justify-content: center;
        }
        .cursor {
          user-select: none;
          cursor: default;
        }
        @supports (-webkit-mask-image: inherit) or (mask-image: inherit) {
          .tab-wrap .tab {
            text-overflow: clip;
            -webkit-mask-image: linear-gradient(
              to right,
              rgba(0, 0, 0, 1) calc(100% - 2em),
              transparent
            );
            mask-image: linear-gradient(
              to right,
              rgba(0, 0, 0, 1) calc(100% - 2em),
              transparent
            );
          }
        }



  • 相关阅读:
    排序算法
    彩票随机6+1,开发实例
    synchronized关键字以及对象锁和类锁的区别
    shell基础
    easyui+Spring MVC+hibernate = 乐途
    easyui + jdbc 实现简单的数据库管理。
    js map
    struts2 using kindeditor upload pictures (including jmagic compressed images)
    easyui filebox 浏览图片
    easyui datagrid to excel
  • 原文地址:https://www.cnblogs.com/newmiracle/p/15931148.html
Copyright © 2020-2023  润新知