body-start.blade.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <!-- 自定义页面启动脚本 -->
  2. <script>
  3. document.addEventListener('DOMContentLoaded', function() {
  4. // 添加淡入动画
  5. const elements = document.querySelectorAll('.fi-main, .fi-topbar, .fi-sidebar');
  6. elements.forEach((el, index) => {
  7. el.style.opacity = '0';
  8. el.style.transform = 'translateY(20px)';
  9. setTimeout(() => {
  10. el.style.transition = 'all 0.5s ease-in-out';
  11. el.style.opacity = '1';
  12. el.style.transform = 'translateY(0)';
  13. }, index * 100);
  14. });
  15. // 自定义滚动条
  16. const style = document.createElement('style');
  17. style.textContent = `
  18. .fi-main::-webkit-scrollbar {
  19. width: 8px;
  20. height: 8px;
  21. }
  22. .fi-main::-webkit-scrollbar-track {
  23. background: #f1f5f9;
  24. border-radius: 4px;
  25. }
  26. .fi-main::-webkit-scrollbar-thumb {
  27. background: #cbd5e1;
  28. border-radius: 4px;
  29. transition: background 0.2s ease;
  30. }
  31. .fi-main::-webkit-scrollbar-thumb:hover {
  32. background: #94a3b8;
  33. }
  34. `;
  35. document.head.appendChild(style);
  36. });
  37. </script>