前端3D炫酷展开效果

效果图

.vue

vue 复制代码
<template>
  <div class="expand">
    <img class="expand-img expand-img-1" src="https://get.hnzmsz.com/ly/1-1.png" />
    <img class="expand-img expand-img-2" src="https://get.hnzmsz.com/ly/1-2.png" />
  </div>
</template>

<script setup>
</script>

<style scoped>
.expand{
  position: relative;
  width: 230px;
  height: 350px;
  margin: 0 auto;

  --s:1s;
}

.expand-img{
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

.expand-img-1{
  transform-origin: bottom;
  transition: all var(--s);
}

.expand-img-2{
  transform-origin: bottom;
  transition: all var(--s);
}

.expand:hover .expand-img-1{
  transform: perspective(1000px) rotateX(30deg) skewX(-20deg);
}

.expand:hover .expand-img-2{
  transform: scale(1.3);
}
</style>

遇到问题可以看我主页加我,很少看博客,对你有帮助别忘记点赞收藏。

相关推荐
奔跑的呱呱牛几秒前
xlsx 已停止维护且存在漏洞!推荐一个可直接替代的 npm 库
前端·npm·node.js·xlsx·sheetjs
珑墨3 分钟前
pnpm 与 node_modules:硬链接、软连接(符号链接)、Junction 速记
前端
freewlt4 分钟前
Monorepo 架构下的前端工程化实践:pnpm + Turborepo 从入门到落地
前端·arcgis·架构
徐小夕8 小时前
我用 AI 撸了个开源"万能预览器":浏览器直接打开 Office、CAD 和 3D 模型
前端·vue.js·github
小码哥_常8 小时前
Flutter Android 延迟加载代码指南:提升应用性能的关键
前端
这是个栗子8 小时前
TypeScript(三)
前端·javascript·typescript·react
kvo7f2JTy8 小时前
基于机器学习算法的web入侵检测系统设计与实现
前端·算法·机器学习
北风toto8 小时前
前端CSS样式详细笔记
前端·css·笔记
nanfeiyan9 小时前
git commit
前端
前端精髓11 小时前
移除 Effect 依赖
前端·javascript·react.js