content.css 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /* 创建一个包装器来控制主页面内容 */
  2. #paiwise-main-wrapper {
  3. position: fixed !important;
  4. top: 0 !important;
  5. left: 0 !important;
  6. width: 100% !important;
  7. height: 100vh !important;
  8. overflow-y: auto !important;
  9. overflow-x: hidden !important;
  10. transition: width 0.3s ease-in-out !important;
  11. }
  12. /* 当侧边栏打开时的主内容样式 */
  13. #paiwise-main-wrapper.sidebar-open {
  14. width: 75% !important;
  15. }
  16. #paiwise-sidebar {
  17. position: fixed !important;
  18. top: 0 !important;
  19. right: -25% !important; /* 初始位置在屏幕外 */
  20. width: 25% !important;
  21. height: 100vh !important;
  22. z-index: 2147483647 !important;
  23. border: none !important;
  24. background: #fff !important;
  25. box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1) !important;
  26. transition: right 0.3s ease-in-out !important;
  27. opacity: 0;
  28. transform: translateX(20px);
  29. }
  30. /* 当侧边栏显示时的样式 */
  31. #paiwise-sidebar.show {
  32. right: 0 !important;
  33. opacity: 1;
  34. transform: translateX(0);
  35. }
  36. /* 隐藏原始滚动条 */
  37. body::-webkit-scrollbar {
  38. display: none !important;
  39. }
  40. body {
  41. margin: 0 !important;
  42. padding: 0 !important;
  43. overflow: hidden !important;
  44. height: 100vh !important;
  45. }
  46. /* 添加动画关键帧 */
  47. @keyframes slideIn {
  48. from {
  49. opacity: 0;
  50. transform: translateX(20px);
  51. }
  52. to {
  53. opacity: 1;
  54. transform: translateX(0);
  55. }
  56. }
  57. @keyframes slideOut {
  58. from {
  59. opacity: 1;
  60. transform: translateX(0);
  61. }
  62. to {
  63. opacity: 0;
  64. transform: translateX(20px);
  65. }
  66. }