当前位置: 首页 > 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>

三、实验效果

http://www.lryc.cn/news/266050.html

相关文章:

  • Plantuml之对象图语法介绍(十九)
  • 深度学习(八):bert理解之transformer
  • R语言中的函数28:Reduce(), Filter(), Find(), Map(), Negate(), Position()
  • RTP/RTCP/RTSP/SIP/SDP/RTMP对比
  • Centos安装vsftpd:centos配置vsftpd,ftp报200和227错误
  • 软件测试职业规划
  • C语言数据结构
  • PHP之Trait理解, Trait介绍
  • SpringMVC:执行原理详解、配置文件和注解开发实现 SpringMVC
  • 增量式旋转编码器在STM32平台上的应用
  • INFINI Gateway 如何防止大跨度查询
  • 【模式识别】探秘分类奥秘:最近邻算法解密与实战
  • 【Redis】分布式锁
  • Linux访问firefox 显示Error: no DISPLAY environment variable specified
  • 线性回归简介
  • Log4net 教程
  • test-01-java 单元测试框架 junit 入门介绍
  • Linux系统中跟TCP相关的系统配置项
  • python图片批量下载多线程+超时重试
  • 冒泡排序之C++实现
  • 【Spring实战】04 Lombok集成及常用注解
  • ubuntu-22.04.3 配置
  • [工具]java_sublime的快速使用
  • 【银行测试】银行金融测试+金融项目测试点汇总...
  • 将PPT的图保持高分辨率导入到Word / WPS中
  • 如何在Spring Boot中优雅地进行参数校验
  • 图还能有数据库?一文带你了解图数据库是个什么东西!
  • 力扣思维题——寻找重复数
  • 基于Kubernetes的jenkins上线
  • 每日一题——轮转数组