栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > Web开发 > Html/CSS > CSS教程

CSS3制作酷炫的三维相册效果

CSS教程 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

特炫的三维相册分享出来,希望大家喜欢!

XML/HTML Code复制内容到剪贴板
  1.   
  2.   
  3.   
  4.   
  5. 三维动画  
  6.   
  7. * {   
  8.     padding : 0px;   
  9.     margin: 0px;   
  10. }   
  11. body {   
  12.     background: url(images/758.jpg) no-repeat top center;   
  13. }   
  14. .product {   
  15.     height: 400px;   
  16.     position: fixed;   
  17.     top: 20%;   
  18.     right: 20%;   
  19.        
  20.     perspective : 500px;   
  21. }   
  22. .scene {   
  23.     height: 250px;   
  24.     width: 250px;   
  25.     transform-style: preserve-3d;   
  26.     transform-origin: 50%;   
  27.     margin: 100px;   
  28.        
  29.     animation: slide 12s linear infinite;   
  30. }   
  31.   
  32. .scene ul li {   
  33.     width: 230px;   
  34.     height: 230px;   
  35.     list-style: none;   
  36.     border: 5px solid rgba(255, 255, 255, 0.5);   
  37.     position: absolute;   
  38. }   
  39.   
  40. @keyframes slide{   
  41.     from{   
  42.         transform: rotateY(0deg);   
  43.     }   
  44.   
  45.     to{   
  46.         transform: rotateY(360deg);   
  47.     }   
  48. }   
  49. .s1 {   
  50.     float: left;   
  51. }   
  52. .s1 ul li:nth-child(1) {   
  53.     transform: rotateY(0deg) translateZ(118px);   
  54. }   
  55. .s1 ul li:nth-child(2) {   
  56.     transform: rotateY(90deg)  translateZ(118px);   
  57. }   
  58. .s1 ul li:nth-child(3) {   
  59.     transform: rotateY(180deg)  translateZ(118px);   
  60. }   
  61. .s1 ul li:nth-child(4) {   
  62.     transform: rotateY(-90deg)  translateZ(118px);   
  63. }   
  64. .s2 {   
  65.     float: right;   
  66. }   
  67. .s2 ul li:nth-child(1) {   
  68.     transform: rotateY(0deg) translateZ(200px);   
  69. }   
  70. .s2 ul li:nth-child(2) {   
  71.     transform: rotateY(90deg)  translateZ(200px);   
  72. }   
  73. .s2 ul li:nth-child(3) {   
  74.     transform: rotateY(180deg)  translateZ(200px);   
  75. }   
  76. .s2 ul li:nth-child(4) {   
  77.     transform: rotateY(-90deg)  translateZ(200px);   
  78. }   
  79.   
  80.   
  81.   
  82.       
  83.       
  84.       
  85.           
  86.             
        
    •                 


    •   
    •                 


    •   
    •                 


    •   
    •                 


    •   
    •             
      
  87.         
  
  •           
  •             
        
    •                 


    •   
    •                 


    •   
    •                 


    •   
    •                 


    •   
    •             
      
  •         
  •   
  •     
  •   
  •   
  •   
  • 下面是截图:

    以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持考高分网。

    转载请注明:文章转载自 www.mshxw.com
    本文地址:https://www.mshxw.com/it/215775.html

    CSS教程相关栏目本月热门文章

    我们一直用心在做
    关于我们 文章归档 网站地图 联系我们

    版权所有 (c)2021-2022 MSHXW.COM

    ICP备案号:晋ICP备2021003244-6号