码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • css3 3d旋转案例:旋转木马


     

    实现步骤:

    1 搭建HTML结构

          

          

          

          

          

          

    1. html>
    2. <html lang="en">
    3. <head>
    4. <meta charset="UTF-8">
    5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
    6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
    7. <title>Documenttitle>
    8. <style>
    9. .far {
    10. perspective: 1000px;
    11. }
    12. section {
    13. transform-style: preserve-3d;
    14. position: relative;
    15. width: 200px;
    16. margin: 100px auto;
    17. animation: move 6s linear infinite;
    18. background: url(images/gwm.jpg) no-repeat;
    19. }
    20. section:hover {
    21. animation-play-state: paused;
    22. }
    23. section div {
    24. top: 0;
    25. left: 0;
    26. position: absolute;
    27. }
    28. section div:nth-child(1) {
    29. transform: translateZ(300px);
    30. }
    31. section div:nth-child(2) {
    32. /* 先旋转好了,再移动 */
    33. transform: rotatey(60deg) translatez(300px);
    34. }
    35. section div:nth-child(3) {
    36. transform: rotatey(120deg) translatez(300px);
    37. }
    38. section div:nth-child(4) {
    39. transform: rotatey(180deg) translatez(300px);
    40. }
    41. section div:nth-child(5) {
    42. transform: rotatey(240deg) translatez(300px);
    43. }
    44. section div:nth-child(6) {
    45. transform: rotatey(300deg) translatez(300px);
    46. }
    47. img {
    48. width: 200px;
    49. }
    50. @keyframes move {
    51. 0% {
    52. transform: rotatey(0);
    53. }
    54. 100% {
    55. transform: rotatey(360deg);
    56. }
    57. }
    58. style>
    59. head>
    60. <body>
    61. <div class="far">
    62. <section>
    63. <div><img src="images/gwm.jpg" alt="">div>
    64. <div><img src="images/gwm.jpg" alt="">div>
    65. <div><img src="images/gwm.jpg" alt="">div>
    66. <div><img src="images/gwm.jpg" alt="">div>
    67. <div><img src="images/gwm.jpg" alt="">div>
    68. <div><img src="images/gwm.jpg" alt="">div>
    69. section>
    70. div>
    71. body>
    72. html>

     

  • 相关阅读:
    30 个数据工程必备的Python 包
    2.如何选择go语言基础类型——Leetcode习题9
    ASP.Net MVC--起步
    多线程入门学习
    基于Springboot+vue的甜品蛋糕销售商城网站 elementui
    QGIS编译(跨平台编译)之五十七:qgis_app库在Qt Creator环境下编译的错误处理
    全球名校AI课程库(3)| Stanford斯坦福 · 深度学习与计算机视觉课程『CS231n』
    ElasticSearch集群配置
    【fatal error C1001: 内部编译器错误】的一个原因
    pg分组过滤
  • 原文地址:https://blog.csdn.net/m0_51495354/article/details/128116967
  • 最新文章
  • 攻防演习之三天拿下官网站群
    数据安全治理学习——前期安全规划和安全管理体系建设
    企业安全 | 企业内一次钓鱼演练准备过程
    内网渗透测试 | Kerberos协议及其部分攻击手法
    0day的产生 | 不懂代码的"代码审计"
    安装scrcpy-client模块av模块异常,环境问题解决方案
    leetcode hot100【LeetCode 279. 完全平方数】java实现
    OpenWrt下安装Mosquitto
    AnatoMask论文汇总
    【AI日记】24.11.01 LangChain、openai api和github copilot
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1
正则表达式工具 cron表达式工具 密码生成工具

京公网安备 11010502049817号