记录几个transition动画效果

1.

移动到此条信息,箭头向右边移动显示出来

  <div class="index-module__circle--YkqL1" @click="goToDetails(item.id)">
          <el-icon
            style="margin: 8px 9px 0px; font-size: 17px; font-weight: bold"
            ><ArrowRight
          /></el-icon>
        </div>

.index-module__circle--YkqL1 {
        transition: all 0.3s ease-in-out;
        height: 32px;
        width: 32px;
        border-radius: 50%;
        background-color: #3767ed;
        align-items: center;
        color: #fff;
        justify-content: center;
        flex-shrink: 0;
        position: absolute;
        right: 110px;
        bottom: 80px;
        opacity: 0;
      }
 .item:hover {
      box-shadow: 0 16px 16px 0 rgb(55 69 103/4%);
      cursor: pointer;
      .title {
        color: #3767ed;
      }
      .index-module__circle--YkqL1 {
        opacity: 1;
        right: 70px;
      }
    }

2.

 点击某个分类,分类下面的线从中间向两边缓慢显示出来

  <div
                class="under-line"
                :class="[item.name == barName ? 'under-line-high' : '']"
              ></div>
 .under-line {
            transform: scaleX(0);
            transform-origin: 50% 50%;
            transition: transform 0.5s ease;
            width: 100%;
            margin: 17px auto 0;
            border-bottom: 3px solid #3767ed;
          }
          .under-line-high {
            transform: scaleX(1);
          }

3.

 hover时,小箭头缓慢向右边移动

代码:

  <div class="text">
          查看更多案例<el-icon><ArrowRight /></el-icon>
        </div>
   .text {
      display: flex;
      position: absolute;
      top: 37%;
      left: 25%;
      color: #fff;
      z-index: 2;
      letter-spacing: 2px;
      font-size: 16px;
      cursor: pointer;
      .el-icon {
        margin: 5px 0 0 3px;
        transition: all 0.2s ease;
      }
    }
 .text:hover i {
      display: block;
      transform: translateX(5px);
      transition: all 0.2s ease;
    }

4.

 原始图标是

效果:hover时,箭头平放,向右边缓慢移动一点距离 

 <div class="newsMore" @click="handleMore">
            <span>查看更多新闻资讯</span>
            <i class="iconfont icon-jiantou_qiehuanxiangxia_o"></i>
          </div>
 .iconfont {
        width: 24px;
        height: 24px;
        top: 25px;
        left: -18px;
        font-size: 24px;
        display: inline-block;
        transform: rotate(90deg) scaleY(-1);
        transition: all 0.2s ease;
      }
.newsMore:hover {
      span {
        color: #1e76e3;
      }
      .iconfont {
        color: #1e76e3;
        transform: rotate(90deg) scaleY(-1) translateY(5px);
        transition: all 0.2s ease;
      }
    }

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值