myworks.css 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /* 标签容器样式 */
  2. .tab-container {
  3. margin: 2px auto;
  4. background: white;
  5. border-radius: 0px 0px 12px 12px;
  6. }
  7. /* 标签导航样式 */
  8. .tab-nav {
  9. display: flex;
  10. border-bottom: 2px solid #eee;
  11. }
  12. .tab-button {
  13. padding: 1rem 2rem;
  14. border: none;
  15. background: none;
  16. cursor: pointer;
  17. font-size: 1.0rem;
  18. color: #666;
  19. transition: all 0.3s ease;
  20. position: relative;
  21. }
  22. .tab-button.active {
  23. color: #2196F3;
  24. font-weight: 600;
  25. }
  26. .tab-button.active::after {
  27. content: '';
  28. position: absolute;
  29. bottom: -2px;
  30. left: 0;
  31. width: 100%;
  32. height: 3px;
  33. background: #2196F3;
  34. }
  35. /* 内容区域样式 */
  36. .tab-content {
  37. display: none;
  38. }
  39. .tab-content.active {
  40. margin-top: 20px;
  41. display: flex;
  42. flex-direction: column;
  43. justify-content: center;
  44. align-items: center;
  45. animation: fadeIn 0.3s ease;
  46. }
  47. @keyframes fadeIn {
  48. from { opacity: 0; transform: translateY(10px); }
  49. to { opacity: 1; transform: translateY(0); }
  50. }
  51. /* 响应式设计, 如果是手机屏幕 */
  52. @media (max-width: 768px) {
  53. .tab-button {
  54. padding: 1rem 1rem;
  55. }
  56. }