返回列表 发布新帖
查看: 163|回复: 0

[代码技巧] 子比主题-文章标题H1-H6标签样式美化(共十个样式风格)

[复制链接]
社区贡献

6

主题

2

回帖

706

积分

等级头衔
Icon组别 : 菜鸟
Icon等级 :

积分成就
   钻石 : -8 颗
   贡献 : 470 点
   金币 : 8 枚
Icon在线时间 : 100 小时
Icon注册时间 : 2025-7-12
Icon最后登录 : 2025-10-28

荣誉勋章

炎龙LV.9

风云·优秀版主

资源无需等待,交易就趁现在,全面资源整合网络大咖云集,让你轻松玩转互联网!

您需要 登录 才可以下载或查看,没有账号?立即注册

×
很久没逛子比主题了,今天无意间看到一个很不错的标题风格样式,优雅又点明重点,提高了阅读体验,后再深挖原来是腾飞老哥的原创。
在此声明该代码来自腾飞博客,也是个美化老玩家了,向他致敬
喜欢哪个样式自己将该哪一款丢到:子比主题–>>自定义CSS样式即可。
第一款风格
第一款就是腾飞自己做的浮动圆点样式,不过也是借鉴别人的站,还是不错的,这款写了H1-H3标题样式,样式自己看图片吧!
1000223091.webp
  1. /* 腾飞博客第二款标题样式美化 */
  2. .article-content > .wp-posts-content > h2,
  3. .article-content .wp-posts-content > h1,
  4. .article-content .wp-posts-content > h3 {
  5.     z-index: 1;
  6. }

  7. .article-content > .wp-posts-content > h2:hover::before,
  8. .article-content > .wp-posts-content > h2:hover::after,
  9. .article-content > .wp-posts-content > h1:hover::before,
  10. .article-content > .wp-posts-content > h1:hover::after,
  11. .article-content > .wp-posts-content > h3:hover::before,
  12. .article-content > .wp-posts-content > h3:hover::after {
  13.     transform: scale(1.2) !important;
  14.     transform-origin: center !important;
  15.     transition: 0.4s;
  16. }

  17. .article-content .wp-posts-content h2::before,
  18. .article-content .wp-posts-content h1::before,
  19. .article-content .wp-posts-content h3::before {
  20.     box-shadow: none !important;
  21.     opacity: 0.6 !important;
  22.     border-radius: 50% !important;
  23.     top: -5px !important;
  24.     left: -10px !important;
  25.     z-index: 1;
  26. }

  27. .article-content .wp-posts-content h1::before,
  28. .article-content .wp-posts-content h1::after {
  29.     background: linear-gradient(#409eff, transparent) !important;
  30. }

  31. .article-content .wp-posts-content h2::before,
  32. .article-content .wp-posts-content h2::after {
  33.     background: linear-gradient(#00ff62, transparent) !important;
  34. }

  35. .article-content .wp-posts-content h3::before,
  36. .article-content .wp-posts-content h3::after {
  37.     background: linear-gradient(#ff9800, transparent) !important;
  38. }

  39. .article-content .wp-posts-content h1::before {
  40.     height: 35px !important;
  41.     width: 35px !important;
  42. }

  43. .article-content .wp-posts-content h2::before {
  44.     height: 30px !important;
  45.     width: 30px !important;
  46. }

  47. .article-content .wp-posts-content h3::before {
  48.     height: 25px !important;
  49.     width: 25px !important;
  50. }

  51. .article-content .wp-posts-content h2::after,
  52. .article-content .wp-posts-content h1::after,
  53. .article-content .wp-posts-content h3::after {
  54.     content: "";
  55.     opacity: 0.6;
  56.     position: absolute;
  57.     transition: 0.4s;
  58.     border-radius: 50%;
  59. }

  60. .article-content .wp-posts-content h2::after {
  61.     top: -15px;
  62.     left: 15px;
  63.     width: 10px;
  64.     height: 10px;
  65. }

  66. .article-content .wp-posts-content h1::after {
  67.     top: -13px;
  68.     left: 25px;
  69.     width: 13px;
  70.     height: 13px;
  71. }

  72. .article-content .wp-posts-content h3::after {
  73.     top: -17px;
  74.     left: 12px;
  75.     width: 8px;
  76.     height: 8px;
  77. }
复制代码

第二款风格
[h1]第二款[/h1]
1000222812.webp
这款猫爪风格好像是初一的原创,H1-H4都是一样的,不过这个扩展性很高,比如遇到自己喜欢的,自己可以替换里面的图片就可以了。
  1. /* 第一款标题样式美化 */
  2. .title-theme {
  3.     padding: 0px 0px 0px 45px!important;
  4.     background: url(https://www.tfbkw.com/wp-content/uploads/2025/03/20250306195527974-biaoti.svg) 10px center no-repeat;
  5.     background-size: 30px 20px;
  6.     color: #566889;
  7. }
  8. .title-theme:before {
  9. display:none;
  10. }
  11. .wp-posts-content>h1.wp-block-heading{
  12.     padding: 0px 0px 0px 45px!important;
  13.     background: url(https://www.tfbkw.com/wp-content/uploads/2025/03/20250306195527974-biaoti.svg) 10px center no-repeat;
  14.     background-size: 30px 20px;
  15. }
  16. .wp-posts-content>h2.wp-block-heading{
  17.     padding: 0px 0px 0px 45px!important;
  18.     background: url(https://www.tfbkw.com/wp-content/uploads/2025/03/20250306195527974-biaoti.svg) 10px center no-repeat;
  19.     background-size: 30px 20px;
  20. }
  21. .wp-posts-content>h3.wp-block-heading{
  22.     padding: 0px 0px 0px 45px!important;
  23.     background: url(https://www.tfbkw.com/wp-content/uploads/2025/03/20250306195527974-biaoti.svg) 10px center no-repeat;
  24.     background-size: 30px 20px;
  25. }
  26. .wp-posts-content>h4.wp-block-heading{
  27.     padding: 0px 0px 0px 45px!important;
  28.     background: url(https://www.qqij.cn/wp-content/uploads/2024/04/17142097132024042709215353.svg) 10px center no-repeat;
  29.     background-size: 30px 20px;
  30. }
  31. .wp-posts-content>h1.wp-block-heading:before{
  32.     display:none;
  33. }
  34. .wp-posts-content>h2.wp-block-heading:before{
  35.     display:none;
  36. }
  37. .wp-posts-content>h3.wp-block-heading:before{
  38.     display:none;
  39. }
  40. .wp-posts-content>h4.wp-block-heading:before{
  41.     display:none;
  42. }
复制代码


第三款
tengfei_down.webp
第三款标题样式腾飞是借鉴的一个游戏站的标题样式,通过图片截取来做的H1-H2的样式,还是不错的,目前用的站还是挺多的!

  1. /* 腾飞博客第三款标题样式美化 */
  2. .wp-posts-content>h1.wp-block-heading{
  3.     position: relative;
  4.     padding: 10px 12px;
  5.     display: block;
  6.     font-size: 20px;
  7.     color: #6297FF;
  8.     font-weight: bold;
  9.     line-height: 26px;
  10.     margin-bottom: 20px;
  11.     background: url(https://img.alicdn.com/imgextra/i2/2210123621994/O1CN01Ga7VH11QbIjzNumln_!!2210123621994.png) no-repeat;
  12.         background-size: 1000px 1000px;
  13.     background-position: -5px -902px;
  14.    
  15. }
  16. .wp-posts-content>h2.wp-block-heading{
  17.     padding: 0px 0px 0px 19px !important;
  18.     position: relative;
  19.     padding: 10px 12px;
  20.     display: block;
  21.     font-size: 20px;
  22.     color: #6297FF;
  23.     font-weight: bold;
  24.     line-height: 32px;
  25.     margin-bottom: 20px;
  26.     background: url(https://img.alicdn.com/imgextra/i2/2210123621994/O1CN01Ga7VH11QbIjzNumln_!!2210123621994.png) no-repeat;
  27.     background-size: 1000px 999px;
  28.     background-position: -3px -837px;
  29. }
  30. .wp-posts-content>h3.wp-block-heading{
  31.     padding: 0px 0px 0px 45px!important;
  32.     background: url(https://tfbk.jzpix.cn/wp-content/themes/ZibTF/pic/h3.svg) 10px center no-repeat;
  33.     background-size: 30px 20px;
  34. }
  35. .wp-posts-content>h1.wp-block-heading:before{
  36.     display:none;
  37. }
  38. .wp-posts-content>h2.wp-block-heading:before{
  39.     display:none;
  40. }
  41. .wp-posts-content>h3.wp-block-heading:before{
  42.     display:none;
  43. }
复制代码


第四款
第四款的话我建议部署一下,因为这个是单独美化了H5-H6,适合做笔记站,而且H6还有动态的效果,还是不错的一款标题样式!
tengfei_down.gif
  1. /* 腾飞博客第四款标题样式美化 */
  2. .article-content h5 {
  3.     padding: 5px 25px;
  4.     margin: 12px 0px;
  5.     position: relative;
  6.     font-size: 18px;
  7.     letter-spacing: 2px;
  8.     color: #f73434;
  9. }
  10. .article-content h5::before {
  11.     content: '';
  12.     position: absolute;
  13.     top: 4px;
  14.     left: 0;
  15.     width: 20px;
  16.     height: 20px;
  17.     background-image: url(https://www.tfbkw.com/wp-content/themes/ZibTF/img/hh5.svg);
  18.     background-size: 100% 100%;
  19. }
  20. .article-content h6:before {
  21.     border-bottom: 2px solid #4dd0e1;
  22.     width: 100%;
  23.     content: "";
  24.     display: block;
  25.     height: 27px;
  26.     position: absolute;
  27.     left: 0;
  28.     top: 0;
  29.     bottom: -2px;
  30.     margin: auto;
  31.     background-size: 28px 28px;
  32.     background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABRklEQVRYR2NkGGDAOMD2M4w6YDQERkNg+ITAppcfY/8zMv3wF+NdTUrZQpUQ2PT6cz8Dw/8CkMWMDIwNvqK8jcQ6gmIHNN19EaXPx1XPyMCghrCUKcpPlGc5MY6gyAE+Fx52MjL8j3cU5a1UYWXtZGBkEAVb+p8hxU+Mby5NHQCxnKEMaskzJ37uFmUetkmMjAzrfUX4woixHBJlZAA0y2EmPPYU4enLkhGeQIqRJDsAh+UgO7duNpD3IcVykkOA2paT5ABaWE60A2hlOdEO8D3/4CMDIyMfWvySFefoaYSoROh74eFXBgYGLiTNVLGc+BC48PAnAwMDG9QBVLOcaAd8P5ox+x/jf5AjGLgYfnwnKqv9/8/PwPO/kFF/MSj0cAKiouD/0bgYoixFU8RovWgJIX1EOYCQIZTIjzpgNARGQ2DAQwAAvHBaIdB7zxsAAAAASUVORK5CYII=);
  33.     background-repeat: no-repeat;
  34.     animation: h6AnimationBefore 2s infinite alternate
  35. }
  36. .article-content h6 {
  37.     margin: 25px 0;
  38.     font-size: 16px;
  39.     position: relative;
  40.     padding: 4px 25px;
  41.     width: max-content;
  42.     color: #4dd0e1
  43. }
  44. .article-content h6:after {
  45.     content: "";
  46.     display: block;
  47.     width: 28px;
  48.     height: 28px;
  49.     position: absolute;
  50.     border: 2px solid #4dd0e1;
  51.     border-radius: 50%;
  52.     right: -15px;
  53.     top: 0;
  54.     bottom: 0;
  55.     margin: auto;
  56.     background-size: 28px 28px;
  57.     background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABRklEQVRYR2NkGGDAOMD2M4w6YDQERkNg+ITAppcfY/8zMv3wF+NdTUrZQpUQ2PT6cz8Dw/8CkMWMDIwNvqK8jcQ6gmIHNN19EaXPx1XPyMCghrCUKcpPlGc5MY6gyAE+Fx52MjL8j3cU5a1UYWXtZGBkEAVb+p8hxU+Mby5NHQCxnKEMaskzJ37uFmUetkmMjAzrfUX4woixHBJlZAA0y2EmPPYU4enLkhGeQIqRJDsAh+UgO7duNpD3IcVykkOA2paT5ABaWE60A2hlOdEO8D3/4CMDIyMfWvySFefoaYSoROh74eFXBgYGLiTNVLGc+BC48PAnAwMDG9QBVLOcaAd8P5ox+x/jf5AjGLgYfnwnKqv9/8/PwPO/kFF/MSj0cAKiouD/0bgYoixFU8RovWgJIX1EOYCQIZTIjzpgNARGQ2DAQwAAvHBaIdB7zxsAAAAASUVORK5CYII=);
  58.     animation: h6AnimationAfter 2s infinite alternate
  59. }
  60. h6 {
  61.     display: block;
  62.     font-size: 1.17em;
  63.     margin-block-start:1em;
  64.     margin-block-end:1em;
  65.     margin-inline-start:0px;
  66.     margin-inline-end:0px;
  67.     font-weight: bold
  68. }
  69. @keyframes h6AnimationBefore {
  70.     0% {
  71.         width: 28px
  72.     }
  73.     25% {
  74.         width: 100%
  75.     }
  76.     50% {
  77.         width: 100%
  78.     }
  79.     to {
  80.         width: 100%
  81.     }
  82. }
  83. @keyframes h6AnimationAfter {
  84.     0% {
  85.         transform: rotate(0)
  86.     }
  87.     10% {
  88.         transform: rotate(0)
  89.     }
  90.     50% {
  91.         transform: rotate(-1turn)
  92.     }
  93.     to {
  94.         transform: rotate(-1turn)
  95.     }
  96. }
复制代码

第五款
这个第五款腾飞是借鉴了vue3的样式来写的,只写了H1-H3,这款很简约,也是不错的样式,不喜欢颜色可以自己自定义颜色,颜色代码应该都会改吧,这就不多说!

第五款

第五款

  1. /* 腾飞博客第五款标题样式美化 */
  2. .article-content h1::before,
  3. .article-content h2::before,
  4. .article-content h3::before {
  5.     content: none !important;
  6.     display: none !important;
  7. }

  8. .article-content h1 {
  9.     margin: 20px 0;
  10.     padding: 8px 15px;
  11.     font-weight: bold;
  12.     font-size: 24px;
  13.     color: #222;
  14.     border-left: 4px solid #2196f3;
  15.     background: #e3f2fd;
  16.     border-radius: 4px;
  17.     width: fit-content;
  18. }

  19. .article-content h2 {
  20.     margin: 20px 0;
  21.     padding: 8px 15px;
  22.     font-weight: bold;
  23.     font-size: 22px;
  24.     color: #222;
  25.     border-left: 4px solid #f44336;
  26.     background: #fdecea;
  27.     border-radius: 4px;
  28.     width: fit-content;
  29. }

  30. .article-content h3 {
  31.     margin: 20px 0;
  32.     padding: 8px 15px;
  33.     font-weight: bold;
  34.     font-size: 20px;
  35.     color: #222;
  36.     border-left: 4px solid #4caf50;
  37.     background: #e8f5e9;
  38.     border-radius: 4px;
  39.     width: fit-content;
  40. }
复制代码

第六款
第六款是借鉴一个做笔记博客的网站,只写了H1-H3的,我觉得还是一个不错的样式,不喜欢颜色可以自己自定义颜色,颜色代码应该都会改吧,这就不多说!

第六款

第六款
  1. /* 腾飞博客第六款标题样式美化 */
  2. .article-content h1::before,
  3. .article-content h2::before,
  4. .article-content h3::before {
  5.     content: none !important;
  6.     display: none !important;
  7. }
  8. .article-content h1,
  9. .article-content h2,
  10. .article-content h3 {
  11.     margin: 20px 0;
  12.     padding: 6px 12px;
  13.     font-weight: bold;
  14.     position: relative;
  15.     display: block;   
  16. }

  17. .article-content h1 {
  18.     font-size: 24px;
  19.     color: #2e7d32;
  20.     background: linear-gradient(to right, #c8e6c9 40%, transparent 100%);
  21. }
  22. .article-content h1::after {
  23.     content: "";
  24.     display: block;
  25.     height: 2px;
  26.     background: linear-gradient(to right, #4caf50, transparent);
  27.     margin-top: 4px;
  28. }
  29. .article-content h2 {
  30.     font-size: 22px;
  31.     color: #1565c0;
  32.     background: linear-gradient(to right, #bbdefb 40%, transparent 100%);
  33. }
  34. .article-content h2::after {
  35.     content: "";
  36.     display: block;
  37.     height: 2px;
  38.     background: linear-gradient(to right, #2196f3, transparent);
  39.     margin-top: 4px;
  40. }
  41. .article-content h3 {
  42.     font-size: 20px;
  43.     color: #c62828;
  44.     background: linear-gradient(to right, #ffcdd2 40%, transparent 100%);
  45. }
  46. .article-content h3::after {
  47.     content: "";
  48.     display: block;
  49.     height: 2px;
  50.     background: linear-gradient(to right, #f44336, transparent);
  51.     margin-top: 4px;
  52. }
复制代码

第七款
这一款是腾飞博客自己随便写的一款,还是不错的,很简约,写了H1-H3标题,不喜欢颜色可以自己自定义颜色,颜色代码应该都会改吧,这就不多说!

第七款

第七款


  1. /* 腾飞博客第七款标题样式美化 */
  2. .article-content h1::before,
  3. .article-content h2::before,
  4. .article-content h3::before {
  5.     content: none !important;
  6.     display: none !important;
  7. }
  8. .article-content h1,
  9. .article-content h2,
  10. .article-content h3 {
  11.     margin: 20px 0;
  12.     padding: 6px 12px;
  13.     font-weight: bold;
  14.     font-size: 20px;
  15.     position: relative;
  16.     display: block;
  17.     border: 2px solid transparent;
  18.     border-left-width: 3px;
  19.     border-radius: 3px 0 0 3px;
  20. }

  21. .article-content h1 {
  22.     border-image: linear-gradient(to right, #f44336, transparent) 1;
  23. }

  24. .article-content h2 {
  25.     border-image: linear-gradient(to right, #00bcd4, transparent) 1;
  26. }

  27. .article-content h3 {
  28.     border-image: linear-gradient(to right, #4caf50, transparent) 1;
  29. }
复制代码

第八款
这一款也是借鉴一个博客网站的样式来写,这款是写H1-H5的样式,我觉得非常简约,不喜欢颜色可以自己自定义颜色,颜色代码应该都会改吧,这款写了两个样式,自己看一下吧!
第一款样式(不带背景)

第一款样式(不带背景)

第一款样式(不带背景)

  1. /* 腾飞博客第八款第二样式标题样式美化 */
  2. .article-content h1::before,
  3. .article-content h2::before,
  4. .article-content h3::before,
  5. .article-content h4::before,
  6. .article-content h5::before {
  7.     content: none !important;
  8.     display: none !important;
  9. }

  10. .article-content h1 {
  11.   padding: 5px 20px;
  12.   border-left: 10px solid #ed5151;
  13.   background-color: rgba(237, 81, 81, 0.05);
  14.   font-size: 19px;
  15.   line-height: 36px;
  16.   color: #333;
  17.   font-weight: bold;
  18.   margin: 15px 0 10px;
  19.   display: block;
  20.   border-radius: 0 4px 4px 0;
  21.   transition: all 0.3s ease;
  22. }

  23. .article-content h1:hover {
  24.   background-color: rgba(237, 81, 81, 0.08);
  25. }

  26. .article-content h2 {
  27.   padding: 5px 20px;
  28.   border-left: 10px solid #BF51ED;
  29.   background-color: rgba(191, 81, 237, 0.05);
  30.   font-size: 18px;
  31.   line-height: 34px;
  32.   color: #333;
  33.   font-weight: bold;
  34.   margin: 12px 0 8px;
  35.   display: block;
  36.   border-radius: 0 4px 4px 0;
  37.   transition: all 0.3s ease;
  38. }

  39. .article-content h2:hover {
  40.   background-color: rgba(191, 81, 237, 0.08);
  41. }

  42. .article-content h3 {
  43.   padding: 5px 20px;
  44.   border-left: 10px solid #6495ed;
  45.   background-color: rgba(100, 149, 237, 0.05);
  46.   font-size: 17px;
  47.   line-height: 32px;
  48.   color: #333;
  49.   font-weight: bold;
  50.   margin: 10px 0 6px;
  51.   display: block;
  52.   border-radius: 0 4px 4px 0;
  53.   transition: all 0.3s ease;
  54. }

  55. .article-content h3:hover {
  56.   background-color: rgba(100, 149, 237, 0.08);
  57. }

  58. .article-content h4 {
  59.   padding: 3px 20px;
  60.   border-left: 10px solid #e2aa2b;
  61.   background-color: rgba(226, 170, 43, 0.05);
  62.   font-size: 16px;
  63.   line-height: 30px;
  64.   color: #333;
  65.   font-weight: bold;
  66.   margin: 8px 0 5px;
  67.   display: block;
  68.   border-radius: 0 4px 4px 0;
  69.   transition: all 0.3s ease;
  70. }

  71. .article-content h4:hover {
  72.   background-color: rgba(226, 170, 43, 0.08);
  73. }

  74. .article-content h5 {
  75.   padding: 3px 20px;
  76.   border-left: 10px solid #64c1c1;
  77.   background-color: rgba(100, 193, 193, 0.05);
  78.   font-size: 15px;
  79.   line-height: 28px;
  80.   color: #333;
  81.   font-weight: bold;
  82.   margin: 6px 0 4px;
  83.   display: block;
  84.   border-radius: 0 4px 4px 0;
  85.   transition: all 0.3s ease;
  86. }

  87. .article-content h5:hover {
  88.   background-color: rgba(100, 193, 193, 0.08);
  89. }
复制代码
第二款样式(带背景)

第二款样式(带背景)

第二款样式(带背景)

  1. /* 腾飞博客第八款第二样式标题样式美化 */
  2. .article-content h1::before,
  3. .article-content h2::before,
  4. .article-content h3::before,
  5. .article-content h4::before,
  6. .article-content h5::before {
  7.     content: none !important;
  8.     display: none !important;
  9. }

  10. .article-content h1 {
  11.   padding: 5px 20px;
  12.   border-left: 10px solid #ed5151;
  13.   background-color: rgba(237, 81, 81, 0.05);
  14.   font-size: 19px;
  15.   line-height: 36px;
  16.   color: #333;
  17.   font-weight: bold;
  18.   margin: 15px 0 10px;
  19.   display: block;
  20.   border-radius: 0 4px 4px 0;
  21.   transition: all 0.3s ease;
  22. }

  23. .article-content h1:hover {
  24.   background-color: rgba(237, 81, 81, 0.08);
  25. }

  26. .article-content h2 {
  27.   padding: 5px 20px;
  28.   border-left: 10px solid #BF51ED;
  29.   background-color: rgba(191, 81, 237, 0.05);
  30.   font-size: 18px;
  31.   line-height: 34px;
  32.   color: #333;
  33.   font-weight: bold;
  34.   margin: 12px 0 8px;
  35.   display: block;
  36.   border-radius: 0 4px 4px 0;
  37.   transition: all 0.3s ease;
  38. }

  39. .article-content h2:hover {
  40.   background-color: rgba(191, 81, 237, 0.08);
  41. }

  42. .article-content h3 {
  43.   padding: 5px 20px;
  44.   border-left: 10px solid #6495ed;
  45.   background-color: rgba(100, 149, 237, 0.05);
  46.   font-size: 17px;
  47.   line-height: 32px;
  48.   color: #333;
  49.   font-weight: bold;
  50.   margin: 10px 0 6px;
  51.   display: block;
  52.   border-radius: 0 4px 4px 0;
  53.   transition: all 0.3s ease;
  54. }

  55. .article-content h3:hover {
  56.   background-color: rgba(100, 149, 237, 0.08);
  57. }

  58. .article-content h4 {
  59.   padding: 3px 20px;
  60.   border-left: 10px solid #e2aa2b;
  61.   background-color: rgba(226, 170, 43, 0.05);
  62.   font-size: 16px;
  63.   line-height: 30px;
  64.   color: #333;
  65.   font-weight: bold;
  66.   margin: 8px 0 5px;
  67.   display: block;
  68.   border-radius: 0 4px 4px 0;
  69.   transition: all 0.3s ease;
  70. }

  71. .article-content h4:hover {
  72.   background-color: rgba(226, 170, 43, 0.08);
  73. }

  74. .article-content h5 {
  75.   padding: 3px 20px;
  76.   border-left: 10px solid #64c1c1;
  77.   background-color: rgba(100, 193, 193, 0.05);
  78.   font-size: 15px;
  79.   line-height: 28px;
  80.   color: #333;
  81.   font-weight: bold;
  82.   margin: 6px 0 4px;
  83.   display: block;
  84.   border-radius: 0 4px 4px 0;
  85.   transition: all 0.3s ease;
  86. }

  87. .article-content h5:hover {
  88.   background-color: rgba(100, 193, 193, 0.08);
  89. }
复制代码

第九款
第十款纯背景没有多说的,喜欢什么颜色自己改颜色,写到了H1-H5标题样式

第九款

第九款

  1. /* 腾飞博客第十款标题样式美化 */
  2. .article-content h1::before,
  3. .article-content h2::before,
  4. .article-content h3::before,
  5. .article-content h4::before,
  6. .article-content h5::before {
  7.     content: none !important;
  8.     display: none !important;
  9. }

  10. .article-content h1 {
  11.   padding: 8px 20px;
  12.   border-left: none;
  13.   background-color: #ed5151;
  14.   font-size: 19px;
  15.   line-height: 30px;
  16.   color: white;
  17.   font-weight: bold;
  18.   margin: 15px 0;
  19.   display: block;
  20.   border-radius: 4px;
  21.   box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  22.   width: fit-content;
  23. }

  24. .article-content h2 {
  25.   padding: 8px 20px;
  26.   border-left: none;
  27.   background-color: #BF51ED;
  28.   font-size: 18px;
  29.   line-height: 30px;
  30.   color: white;
  31.   font-weight: bold;
  32.   margin: 12px 0;
  33.   display: block;
  34.   border-radius: 4px;
  35.   box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  36.   width: fit-content;
  37. }

  38. .article-content h3 {
  39.   padding: 8px 20px;
  40.   border-left: none;
  41.   background-color: #6495ed;
  42.   font-size: 17px;
  43.   line-height: 27px;
  44.   color: white;
  45.   font-weight: bold;
  46.   margin: 10px 0;
  47.   display: block;
  48.   border-radius: 4px;
  49.   box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  50.   width: fit-content;
  51. }

  52. .article-content h4 {
  53.   padding: 8px 20px;
  54.   border-left: none;
  55.   background-color: #e2aa2b;
  56.   font-size: 16px;
  57.   line-height: 24px;
  58.   color: white;
  59.   font-weight: bold;
  60.   margin: 8px 0;
  61.   display: block;
  62.   border-radius: 4px;
  63.   box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  64.   width: fit-content;
  65. }

  66. .article-content h5 {
  67.   padding: 8px 20px;
  68.   border-left: none;
  69.   background-color: #64c1c1;
  70.   font-size: 15px;
  71.   line-height: 21px;
  72.   color: white;
  73.   font-weight: bold;
  74.   margin: 6px 0;
  75.   display: block;
  76.   border-radius: 4px;
  77.   box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  78.   width: fit-content;
  79. }
复制代码

第十款
这个写了H1-H3,右边加了动态的效果,我觉得还是不错的,喜欢的自行部署!

第十款

第十款

  1. /* 腾飞博客第十一款标题样式美化 */
  2. .article-content h1::before,
  3. .article-content h2::before,
  4. .article-content h3::before {
  5.     content: none !important;
  6.     display: none !important;
  7. }
  8. .article-content h1,
  9. .article-content h2,
  10. .article-content h3 {
  11.     display: block;         
  12.     width: fit-content;      
  13.     margin: 20px 0;
  14.     padding: 12px 24px 12px 28px;
  15.     font-weight: 800;
  16.     font-size: 1.8em;
  17.     color: #fff;
  18.     border-radius: 12px;
  19.     position: relative;
  20.     text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
  21.     overflow: hidden;
  22.     cursor: default;
  23.     transition: transform 0.3s, box-shadow 0.3s;
  24. }

  25. .article-content h1:hover,
  26. .article-content h2:hover,
  27. .article-content h3:hover {
  28.     transform: translateY(-2px);
  29.     box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  30. }

  31. .article-content h1 {
  32.     background: linear-gradient(90deg, #ff6b6b, #f44336);
  33. }
  34. .article-content h2 {
  35.     background: linear-gradient(90deg, #4dd0e1, #00bcd4);
  36. }
  37. .article-content h3 {
  38.     background: linear-gradient(90deg, #81c784, #4caf50);
  39. }

  40. .article-content h1::before,
  41. .article-content h2::before,
  42. .article-content h3::before {
  43.     content: '';
  44.     position: absolute;
  45.     top: 0;
  46.     left: 0;
  47.     width: 6px;
  48.     height: 100%;
  49.     border-radius: 12px 0 0 12px;
  50. }

  51. .article-content h1::before { background: #f44336; }
  52. .article-content h2::before { background: #00bcd4; }
  53. .article-content h3::before { background: #4caf50; }

  54. .article-content h1::after,
  55. .article-content h2::after,
  56. .article-content h3::after {
  57.     content: '✨';
  58.     position: absolute;
  59.     top: -5px;
  60.     right: -10px;
  61.     font-size: 1em;
  62.     animation: twinkle 2s infinite alternate;
  63.     opacity: 0.6;
  64. }

  65. @keyframes twinkle {
  66.     0% { opacity: 0.3; transform: scale(0.8) rotate(0deg); }
  67.     50% { opacity: 1; transform: scale(1.2) rotate(15deg); }
  68.     100% { opacity: 0.3; transform: scale(0.8) rotate(-15deg); }
  69. }
复制代码


本帖被以下淘专辑推荐:

诚信连接交易,资源创造价值。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

飞流广播+ 发布

系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
10-30 17:02
系统消息:柒沐已经连续答对10道难题,逆天学霸谁与争锋?!#每日答题#
10-09 09:07
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
09-24 09:00
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
09-11 11:40
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
09-02 09:17
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
08-27 08:56
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
08-20 15:12
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
08-03 10:22
系统消息:柒沐已经连续答对10道难题,逆天学霸谁与争锋?!#每日答题#
06-30 08:57
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
06-18 09:14
系统消息:清风网络已经连续答对10道难题,逆天学霸谁与争锋?!#每日答题#
04-11 09:40
系统消息:清风网络已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
04-10 09:31
系统消息:IXM77777已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
04-09 13:44
系统消息:清风网络已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
04-09 09:22
系统消息:柒沐已经连续答对10道难题,逆天学霸谁与争锋?!#每日答题#
04-09 08:52
系统消息:清风网络已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
04-08 09:24
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
04-07 09:02
系统消息:柒沐已经连续答对10道难题,逆天学霸谁与争锋?!#每日答题#
02-27 09:35
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
02-26 09:06
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
02-25 08:49
站内通告

提供资源交易、信息共享、靓号交流、技术变现、学习问答、兴趣娱乐等全面服务。

1.丰富功能系统,扩展社区特色玩法,打造最好的互联网聚集圈子。

2.准确信息真实交易,安全快捷又方便,让虚拟交易面对面。

3. 天上不会掉馅饼,话术骗术迷人心,切勿脱离平台线下交易,被骗与平台无关!

4. 欺诈骗钱,违规违法将视情受到警告&禁言&封号甚至检举至👮🏻‍♀️处理!

官方Q群:123129钉推群:BAYR2383 站长QQ:3220000000

投诉/建议/商务合作联系

fl@fllt.cn

严禁私下交易,被骗与本站无关。
违反交易细则,取证立查严惩。
  • 钉钉新帖推送群
  • 官方交流QQ群
  • 站长唯一微信号

👮曝光Ta|🧿小黑屋|📴手机页|飞流网 ( 渝ICP备2025054677号-1|电信增值许可 渝B2-20250789 )|网站地图

GMT+8, 2025-11-8 11:05 , Processed in 0.110353 second(s), 57 queries, MemCached On , Gzip On.

Based on XJ-TX X3.5 Licensed

飞流论坛 HanAnalytics icp Astro vhAstro-Theme

关灯 在本版发帖
扫一扫添加微信客服
QQ客服返回顶部
快速回复 返回顶部 返回列表