练习4_文章练习.html 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Document</title>
  7. <style>
  8. /* css reset */
  9. body{
  10. /* body 有默认8px的外边距,需要重置 */
  11. margin: 0;
  12. }
  13. h1{
  14. margin:0;
  15. }
  16. p{
  17. margin:0;
  18. }
  19. /* 页面背景色 */
  20. body{
  21. background-color: #FAFAFA;
  22. }
  23. /* 文章容器 */
  24. .container{
  25. width: 600px;
  26. background-color: #ffffff;
  27. box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  28. margin:50px auto;
  29. padding: 50px 60px;
  30. }
  31. /* 文章标题 */
  32. .title{
  33. font-size: 36px;
  34. font-weight: 700;
  35. }
  36. /* 文章信息 */
  37. .articl-info{
  38. border-bottom: 1px solid #E5E5E5;
  39. padding:20px 0;
  40. font-size: 14px;
  41. }
  42. .articl-info .author{
  43. font-weight: 500;
  44. color: #333;
  45. margin-right: 20px;
  46. }
  47. .articl-info .time{
  48. color: #888;
  49. margin-right: 20px;
  50. }
  51. .articl-info .category{
  52. color: #e74c3c;
  53. letter-spacing: 5px;
  54. }
  55. /* 文章内容 */
  56. .content{
  57. padding:40px 0;
  58. }
  59. .content p{
  60. line-height: 1.8;
  61. font-size: 16px;
  62. color: #444;
  63. }
  64. .content p .text-style-one{
  65. font-weight: 700;
  66. color: #e74c3c;
  67. }
  68. </style>
  69. </head>
  70. <body>
  71. <div class="container">
  72. <h1 class="title">前端工程师的自我修养:持续学习与深度思考</h1>
  73. <div class="articl-info">
  74. <span class="author">作者:张三</span>
  75. <span class="time">2026年5月23日</span>
  76. <span class="category">技术博客</span>
  77. </div>
  78. <div class="content">
  79. <p>在快速发展的前端领域,技术更新迭代速度越来越快。作为一名前端工程师,如何在激烈的竞争中保持核心竞争力?答案很简单:<span class="text-style-one">持续学习</span>与<span class="text-style-one">深度思考</span>。本文将分享我在前端成长道路上的一些经验和思考。</p>
  80. </div>
  81. </div>
  82. </body>
  83. </html>