卡片旋转动画效果

news/发布时间2024/5/20 14:35:34

效果图如下:

 

 

 html页面

<!DOCTYPE html>
<html><head><meta charset="utf-8"><title></title><link rel="stylesheet" href="css/index.css" /></head><body><div class="container"><div class="card" style="--i:-4;">1</div><div class="card" style="--i:-3;">2</div><div class="card" style="--i:-2;">3</div><div class="card" style="--i:-1;">4</div><div class="card" style="--i:0;">5</div><div class="card" style="--i:1;">6</div><div class="card" style="--i:2;">7</div><div class="card" style="--i:3;">8</div><div class="card" style="--i:4;">9</div></div></body>
</html>

css样式

* {margin: 0;padding: 0;box-sizing: border-box;
}
body{display: flex;justify-content: center;align-items: center;min-height: 100vh;overflow: hidden;background: #0f0f0f;
}.container{position: relative;width: 100%;display: flex;justify-content: center;align-items: center;
}.container .card{position: absolute;width: 240px;height: 360px;background: #5e5cfc;border-radius: 8px;display: flex;justify-content: center;align-items: center;color: rgba(0, 0, 0, 0);font-size: 8em;font-weight: 700;border: 10px solid rgba(0, 0, 0, .1);transition: .5s;transform-origin: 50% 100%;filter: hue-rotate(calc(var(--i)* 60deg));box-shadow: 0 15px 50px rgba(0, 0, 0, .1);
}.container:hover .card{transform: rotate(calc(var(--i)* 5deg))translate(calc(var(--i) * 120px), -50px);box-shadow: 0 15px 50px rgba(0, 0, 0, .25);color: rgba(255, 255, 255, .25);cursor: pointer;
}.container:active .card:not(:active){background: #333;
}.container .card:active{translate: calc(var(--i) * 20px) -50px;z-index: 999;color: rgba(255, 255, 255, 1);
}

  

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.diaolansx.cn/news/16445851.html

如若内容造成侵权/违法违规/事实不符,请联系吊兰实现网进行投诉反馈email:xxxxxxxx@qq.com,一经查实,立即删除!

相关文章

LINUX命令行书写规则

Linux在命令、选项、参数、需要添加空格区分,可以是单个或者多个空格。连续的空格在Linux中按照一个空格处理 Linux 命令区分大小写 报错:Command not found 命令未找到说明两种情况 1.内部没有这个命令 命令打错了 2.外部命令也没有这个命令,在确认命令没有打错的情况下,…

科目四

科四比科一多了多选题 不考:扣分题 罚款题 判刑题 动画题考:交通信号 案例多选(难)案例多选 酒驾 20-80 mg/ml 醉驾 >80 mg/ml 疲劳驾驶-开车4小时要休息20分钟l交通信号交警手势核心口诀:交警脸不对我,掌心对我,我要停车。交通标志核心口诀:会车哪边粗哪边先走,三…

海光处理器与软件栈

海光处理器与软件栈参考文献链接 https://www.hygon.cn/index人工智能芯片与自动驾驶

E-portfolio

Project 1 EmoDB dataset with SVM emotion classification Train SVM machine learning model using the IS09 feature set of the EmoDB dataset. Result of the project, accuracy more than 75% :Core code using Python:Project 2 Signal processing using MATLAB

Fnt文件编辑工具

这个仅仅是修改fnt,不负责从fnt生成unity字体文件。 fnt生成字体文件看这边:ugui位图字体使用 - fnt生成fontsettings工具效果 工具代码public class FntEditTool : EditorWindow {[MenuItem("MyTools/Fnt Edit Tool", false, 100)]private static void ShowWindo…

Profinet转Modbus网关接称重设备与1200PLC通讯

Profinet转Modbus网关(XD-MDPN100)是一种能够实现Modbus协议和Profinet协议之间转换的设备。Profinet转Modbus网关可提供单个或多个RS485接口,使用Profinet转Modbus网关将称重设备与西门子1200 PLC进行通讯,可以避免繁琐的编程和配置过程,节省了工程师的时间和精力。其次,…