content.css 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* 重置页面布局 - 移除全局overflow限制 */
  2. html,
  3. body {
  4. margin: 0 !important;
  5. padding: 0 !important;
  6. width: 100% !important;
  7. height: 100% !important;
  8. }
  9. /* 动画中状态 - 禁用页面滚动 */
  10. body.sidebar-animating {
  11. overflow: hidden !important;
  12. }
  13. /* 主内容区域 */
  14. #paiwise-main-wrapper {
  15. position: fixed !important;
  16. top: 0 !important;
  17. left: 0 !important;
  18. width: 100% !important;
  19. height: 100vh !important;
  20. overflow-y: auto !important;
  21. overflow-x: hidden !important;
  22. transition: width 0.3s ease-out !important;
  23. backface-visibility: hidden !important; /* 优化动画性能 */
  24. -webkit-font-smoothing: antialiased !important;
  25. }
  26. /* 侧边栏 */
  27. #paiwise-sidebar {
  28. position: fixed !important;
  29. top: 0 !important;
  30. right: 0 !important;
  31. width: 400px !important;
  32. height: 100vh !important;
  33. background: #fff !important;
  34. border: none !important;
  35. box-shadow: -4px 0 16px rgba(0, 0, 0, 0.08) !important;
  36. z-index: 2147483647 !important;
  37. transform: translateX(100%) !important;
  38. visibility: hidden !important;
  39. opacity: 0 !important;
  40. transition: transform 0.3s ease-out, visibility 0.3s, opacity 0.3s !important;
  41. }
  42. /* 侧边栏显示状态 */
  43. #paiwise-sidebar.show {
  44. transform: translateX(0) !important;
  45. visibility: visible !important;
  46. opacity: 1 !important;
  47. }
  48. /* 主内容区域在侧边栏显示时的状态 */
  49. body.sidebar-open #paiwise-main-wrapper {
  50. width: calc(100% - 400px) !important;
  51. }
  52. /* 移除所有动画关键帧,使用transform实现动画 */