当前位置: 首页 > news >正文

html旋转相册

一、实验题目

做一个旋转的3d相册,当鼠标停留在相册时,相册向四面散开

二、实验代码

<!DOCTYPE html>
<html lang="zh"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><style>body{perspective: 1500px;}@keyframes myAnimation {from{transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);}to{transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg);}}.container{margin:200px;position: relative;transform-style: preserve-3d;/* animation:myAnimation 5s linear 0s infinite; */animation-name: myAnimation;animation-duration: 5s;animation-timing-function: linear;animation-delay: 0s;animation-iteration-count: infinite;}.container:hover>img:first-child{left: -300px;}.container:hover>img:nth-child(2){top: -300px;}.container:hover>img:nth-child(3){left: 300px;}.container:hover>img:nth-child(4){top: 300px;}.container:hover>img:nth-child(6){transform: translateZ(300px);}.container:hover>img:nth-child(5){transform: translateZ(-100px);}.container>img{width: 200px;height: 200px;position: absolute;border: 1px solid red;transition: 3s;}.container>img:first-child{left: -200px;transform-origin: right;transform: rotateY(90deg);}.container>img:nth-child(2){top:-200px;transform-origin: bottom;transform:rotateX(-90deg);}.container>img:nth-child(3){left: 200px;transform-origin: left;transform:rotateY(-90deg)}.container>img:nth-child(4){top: 200px;transform-origin: top;transform: rotateX(90deg);}.container>img:nth-child(6){transform: translateZ(200px);}</style></head><body><div class="container"><img src="https://img1.baidu.com/it/u=4141189809,1768157998&fm=253&fmt=auto&app=138&f=JPEG?w=667&h=500" alt=""><img src="https://img0.baidu.com/it/u=2016271455,67708748&fm=253&fmt=auto&app=138&f=PNG?w=500&h=402" alt=""><img src="https://img2.baidu.com/it/u=2015943875,2629908785&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=666" alt=""><img src="https://img2.baidu.com/it/u=106832573,1691962947&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=682" alt=""><img src="https://img0.baidu.com/it/u=2104936347,2912513001&fm=253&fmt=auto&app=138&f=JPEG?w=389&h=500" alt=""><img src="https://img1.baidu.com/it/u=1599285144,422526079&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375" alt=""></div></body>
</html>

三、实验效果

相关文章:

  • 『CVE』简析CVE-2023-48795:SSH协议前缀截断攻击(Terrapin攻击)
  • 【python】Ubuntu下安装spyder及matplotlib中文显示
  • 分布式锁常见问题及其解决方案
  • Elasticsearch基本使用
  • hive中array相关函数总结
  • 验证码服务使用指南
  • 算法基础之最长公共子序列
  • 基于Python的新能源汽车销量分析与预测系统
  • 前端学习笔记
  • 平衡二叉树的构建(递归
  • 【WPF.NET开发】数据绑定应用场景
  • 如何开发专属花店展示平台小程序?
  • uni-app 工程目录结构介绍
  • paddle 56 将图像分类模型嵌入到目标检测中并实现端到端的部署(用图像分类模型进行目标检测切片分类)
  • Ubuntu20.04纯命令配置PCL(点云库)
  • 【划重点】MySQL技术内幕:InnoDB存储引擎
  • 【译】理解JavaScript:new 关键字
  • 03Go 类型总结
  • angular2开源库收集
  • Angularjs之国际化
  • co模块的前端实现
  • iOS小技巧之UIImagePickerController实现头像选择
  • underscore源码剖析之整体架构
  • vue中实现单选
  • 创建一种深思熟虑的文化
  • 工作手记之html2canvas使用概述
  • 记一次删除Git记录中的大文件的过程
  • 前嗅ForeSpider教程:创建模板
  • 人脸识别最新开发经验demo
  • 我感觉这是史上最牛的防sql注入方法类
  • shell使用lftp连接ftp和sftp,并可以指定私钥
  • Spring Batch JSON 支持
  • ​如何防止网络攻击?
  • #Linux(权限管理)
  • (9)STL算法之逆转旋转
  • (动态规划)5. 最长回文子串 java解决
  • (附源码)ssm失物招领系统 毕业设计 182317
  • (学习日记)2024.02.29:UCOSIII第二节
  • (一)VirtualBox安装增强功能
  • .bat批处理(三):变量声明、设置、拼接、截取
  • .NET 动态调用WebService + WSE + UsernameToken
  • .net流程开发平台的一些难点(1)
  • .NET命令行(CLI)常用命令
  • .NET企业级应用架构设计系列之技术选型
  • @EnableAsync和@Async开始异步任务支持
  • [ web基础篇 ] Burp Suite 爆破 Basic 认证密码
  • [\u4e00-\u9fa5] //匹配中文字符
  • [bbk5179]第66集 第7章 - 数据库的维护 03
  • [BJDCTF2020]The mystery of ip1
  • [EFI]MSI GF63 Thin 9SCXR电脑 Hackintosh 黑苹果efi引导文件
  • [Git].gitignore失效的原因
  • [Go WebSocket] 多房间的聊天室(五)用多个小锁代替大锁,提高效率
  • [IMX6DL] CPU频率调节模式以及降频方法
  • [LeetCode] 596:超过5名学生的课
  • [LeetCode]Max Points on a Line