You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

rotation3D.css 4.5 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. /*
  2. 椭圆会使内部失真 transform: rotateX(50deg);
  3. */
  4. .rotation3D{
  5. position: relative; width: 800px; height: 800px; cursor: move; user-select: none;
  6. margin: 0 auto; margin-top: -40px;
  7. /* border: 1px solid white; border-radius: 100%; */
  8. }
  9. .rotation3D .center{
  10. display: none;
  11. position: absolute; left: 50%; top: 50%;
  12. transform: translate(-50%, -50%);
  13. }
  14. .rotation3D .itemList{ position: absolute; width: 100%; height: 100%; z-index: 20; }
  15. .rotation3D .lineList{
  16. position: absolute; width: 100%; height: 100%; z-index: 10;
  17. transform-style: preserve-3d;
  18. }
  19. /*---------------------------点样式---------------------------*/
  20. .rotation3D__item{
  21. position: absolute; display: block; cursor: pointer; width: 161px; height: 188px;
  22. text-align: center; line-height: 30px; font-size: 16px; color: white;
  23. /*background: #2292ef; border-radius: 4px;*/
  24. }
  25. .rotation3D__item .scale{ position: absolute; top: 0; width: 100%; height: 100%; }
  26. .rotation3D__item .cont{ position: relative; z-index: 2; }
  27. .rotation3D__item .cont .iconfont { font-size: 28px; margin-top: 30px; margin-bottom: 96px; display: block; }
  28. .rotation3D__item .cont p{ color: #101010; }
  29. .itemList .rotation3D__item .cont p::after{
  30. content: '';
  31. position: absolute;
  32. left: 0;
  33. right: 0;
  34. }
  35. .itemList .rotation3D__item:nth-child(1) .cont p::after{
  36. content: "云脑一号";
  37. }
  38. .itemList .rotation3D__item:nth-child(2) .cont p::after{
  39. content: "云脑二号";
  40. }
  41. .itemList .rotation3D__item:nth-child(3) .cont p::after{
  42. content: "北大分中心";
  43. }
  44. .itemList .rotation3D__item:nth-child(4) .cont p::after{
  45. content: "合肥分中心";
  46. }
  47. .itemList .rotation3D__item:nth-child(5) .cont p::after{
  48. content: "武汉AI中心";
  49. }
  50. .itemList .rotation3D__item:nth-child(6) .cont p::after{
  51. content: "西安AI中心";
  52. }
  53. .itemList .rotation3D__item:nth-child(7) .cont p::after{
  54. content: "中原AI中心";
  55. }
  56. .itemList .rotation3D__item:nth-child(8) .cont p::after{
  57. content: "成都AI中心";
  58. }
  59. .rotation3D__item.blue{ color: #01e9fc; }
  60. .rotation3D__item.green{ color: #b4b3ca; }
  61. .rotation3D__item.yellow{ color: #ffd200; }
  62. /*底座*/
  63. .rotation3D__item .baseImg{ position: absolute; width: 100%; height: 100%; z-index: 1; }
  64. .rotation3D__item.blue .baseImg{ background: url("img/idc-red.png"); }
  65. .rotation3D__item.green .baseImg{ background: url("img/idc-green.png"); }
  66. .rotation3D__item.yellow .baseImg{ background: url("img/idc-yellow.png"); }
  67. /*---------------------------
  68. 线样式
  69. 线高为总高的一般
  70. ---------------------------*/
  71. .rotation3D__line{
  72. position: absolute; left: 50%; top: 50%;
  73. display: block; width: 1px; height: 50%;
  74. padding-top: 60px; color: #fff; font-size: 50px;
  75. /*background: #fff;*/
  76. /*原点设置在中间*/
  77. transform-origin: 50% 0;
  78. transform-style: preserve-3d;
  79. }
  80. .rotation3D__line .pos{ position: absolute; top: 0; }
  81. .rotation3D__line svg { position: absolute; top: 0; }
  82. .rotation3D__line svg path {
  83. stroke: #fff; fill: none;
  84. stroke-width: 2;
  85. animation: path-animation 100s linear 0s infinite normal;
  86. }
  87. @keyframes path-animation {
  88. 0% { stroke-dashoffset:500; }
  89. 100% { stroke-dashoffset:0; }
  90. }
  91. .rotation3D__line .dot {
  92. position: absolute; top: 0; left: 0; text-align: center;
  93. /*width: 35px; height: 35px; font-size: 35px; */
  94. width: 24px; height: 24px; font-size: 24px;
  95. }
  96. .rotation3D__line .dot1,.rotation3D__line .dot3,.rotation3D__line .dot4{
  97. animation: svg-path-animation 6s ease-in-out 0s infinite normal;
  98. }
  99. .rotation3D__line .dot1{
  100. offset-path: path("M0 400, 0 0"); offset-distance: 0%;
  101. }
  102. .rotation3D__line .dot2{
  103. offset-path: path("M0 200, 0 0"); offset-distance: 0%;
  104. background: #ffd200; border-radius: 100%;
  105. font-size: 22px; color: #000;
  106. }
  107. .rotation3D__line .dot3{
  108. offset-path: path("M20 400 S 0 200, 20 0"); offset-distance: 0%;
  109. }
  110. .rotation3D__line .dot4{
  111. position: relative;
  112. offset-path: path("M20 0 S 40 200, 20 400"); offset-distance: 0%;
  113. }
  114. @keyframes svg-path-animation {
  115. from {offset-distance: 0%;}
  116. to {offset-distance: 100%;}
  117. }
  118. .dot4 > span{
  119. position: absolute;
  120. font-size: 12px;
  121. color: #000;
  122. transform: rotate(180deg)scale(0.80);
  123. }
  124. /*颜色*/
  125. .rotation3D__line.blue { color: #07b2f9; }
  126. .rotation3D__line.green { color: #b4b3ca; }
  127. .rotation3D__line.yellow { color: #ffd500; }
  128. .rotation3D__line.blue svg path { stroke: #07b2f9; }
  129. .rotation3D__line.green svg path { stroke: #b4b3ca; }
  130. .rotation3D__line.yellow svg path { stroke: #ffd500; }