当前位置:   article > 正文

css实现圆柱_css 3d 圆柱

css 3d 圆柱

​​​​​​纯css实现圆柱体-超简单! - 走看看

css实现圆柱的形状_爱吃烧鸭蛋的叶安的博客-CSDN博客_css实现圆柱体

  1. /*外柱子*/
  2. <div
  3. className="yellow-out-bar"
  4. /* 外柱子 = 外柱子+内柱子 保证外柱子永远比内柱子 高*/
  5. style={{ height: multiply(add(外柱子, 内柱子)), 2.5) }}
  6. >
  7. /*内柱子*/
  8. <div
  9. className="yellow-inner-bar"
  10. style={{ height: multiply(内柱子, 1.5) }}
  11. />
  12. </div>
  13. /* 黄色柱子 */
  14. .yellow-out-bar {
  15. position: relative;
  16. width: 26px;
  17. background-color: transparent;
  18. border-right: 1px solid #c1a237;
  19. border-left: 1px solid #b49133;
  20. background-image: linear-gradient(to left,rgb(156 115 42 / 51%),30%,#af8b30cc,rgb(33 87 129 / 36%));
  21. }
  22. .yellow-out-bar:before {
  23. position: absolute;
  24. content: '';
  25. display: block;
  26. height: 22px;
  27. width: 100%;
  28. border-radius: 50%;
  29. top: -10.5px;
  30. z-index: 4;
  31. background-color: rgb(175 139 48);
  32. border: 1px solid #f9e963;
  33. }
  34. .yellow-out-bar:after {
  35. position: absolute;
  36. content: '';
  37. display: block;
  38. height: 18px;
  39. width: 100%;
  40. border-radius: 50%;
  41. bottom: -10px;
  42. border: 1px solid #bba53d;
  43. background-image: linear-gradient(to left,rgb(82 42 6),72% ,#9b8319);
  44. }
  45. .yellow-inner-bar {
  46. border-left: #feee6b;
  47. border-right: #feee6b;
  48. position: absolute;
  49. bottom: 5px;
  50. width: 20px;
  51. left: 2px;
  52. height: 50%;
  53. background-image: linear-gradient(to left,rgb(221 203 70),82% ,#e7d74a);
  54. text-align: center;
  55. z-index: 3;
  56. }
  57. .yellow-inner-bar::before {
  58. position: absolute;
  59. content: '';
  60. display: block;
  61. height: 17px;
  62. width: 100%;
  63. background-color: rgb(221 202 67 / 90%);
  64. border-radius: 50%;
  65. top: -9.5px;
  66. z-index: 1;
  67. border: 1px solid rgb(229 241 134);
  68. }
  69. .yellow-inner-bar:after {
  70. position: absolute;
  71. content: '';
  72. display: block;
  73. height: 17px;
  74. width: 100%;
  75. border-radius: 50%;
  76. background-color: #e9d849;
  77. background-image: linear-gradient(to left,rgb(222 203 70),82% ,#f4e350);
  78. bottom: -10px;
  79. z-index: 2;
  80. border-bottom: 1px solid #f8eb65;
  81. }
  82. `

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Gausst松鼠会/article/detail/96770
推荐阅读
相关标签
  

闽ICP备14008679号