styles.css 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /* 全局样式 */
  2. body {
  3. font-family: Arial, sans-serif;
  4. line-height: 1.6;
  5. margin: 0;
  6. padding: 0;
  7. background-color: #f9f9f9;
  8. color: #333;
  9. }
  10. /* 容器样式 */
  11. div {
  12. max-width: 800px;
  13. margin: 20px auto;
  14. padding: 15px;
  15. background: #ffffff;
  16. border: 1px solid #ddd;
  17. border-radius: 8px;
  18. box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  19. }
  20. /* 标题样式 */
  21. h2 {
  22. font-size: 1.8em;
  23. margin-bottom: 10px;
  24. color: #555;
  25. text-align: center;
  26. }
  27. /* 列表样式 */
  28. ul {
  29. list-style-type: none;
  30. padding: 0;
  31. margin: 0;
  32. }
  33. li {
  34. padding: 10px 15px;
  35. border-bottom: 1px solid #eee;
  36. transition: background-color 0.2s ease-in-out;
  37. }
  38. li:last-child {
  39. border-bottom: none;
  40. }
  41. /* 鼠标悬停效果 */
  42. li:hover {
  43. background-color: #f5f5f5;
  44. }
  45. /* 链接样式 */
  46. a {
  47. text-decoration: none;
  48. color: #007bff;
  49. font-weight: bold;
  50. transition: color 0.2s ease-in-out;
  51. }
  52. a:hover {
  53. color: #0056b3;
  54. }
  55. /* 标签样式 */
  56. span {
  57. display: inline-block;
  58. margin-left: 10px;
  59. padding: 2px 6px;
  60. font-size: 0.8em;
  61. color: #1a1a1a;
  62. background-color: #f3f4f5;
  63. border-radius: 4px;
  64. vertical-align: middle;
  65. }
  66. span.popular {
  67. background-color: #28a745;
  68. }
  69. span.new {
  70. background-color: #dc3545;
  71. }