查看: 103|回复: 0

首页快速链接代码

[复制链接]

35

主题

57

回帖

1673

积分

管理员

积分
1673
发表于 2026-10-11 12:21:37 | 显示全部楼层 |阅读模式
  1. <div class="card h139-banner-card">
  2.   <div class="h139-banner-cats h139-banner-desktop"><a href="https://www.h139.com/categories/ai-tools" class="h139-cat-link" target="_blank" rel="noopener noreferrer">AI工具</a> <span class="cat-sep">·</span> <a href="https://www.h139.com/categories/reading-creation" class="h139-cat-link" target="_blank" rel="noopener noreferrer">自媒体</a> <span class="cat-sep">·</span> <a href="https://www.h139.com/categories/news-media" class="h139-cat-link" target="_blank" rel="noopener noreferrer">新闻</a> <span class="cat-sep">·</span> <a href="https://www.h139.com/categories/watch-movies-online" class="h139-cat-link" target="_blank" rel="noopener noreferrer">影视</a> <span class="cat-sep">·</span> <a href="https://www.h139.com/categories/novel-reading" class="h139-cat-link" target="_blank" rel="noopener noreferrer">小说</a> <span class="cat-sep">·</span> <a href="https://www.h139.com/categories/music-radio" class="h139-cat-link" target="_blank" rel="noopener noreferrer">音乐</a> <span class="cat-sep">·</span> <a href="https://www.h139.com/categories/gaming-resources" class="h139-cat-link" target="_blank" rel="noopener noreferrer">游戏</a> <span class="cat-sep">·</span> <a href="https://www.h139.com/categories/exam-signup" class="h139-cat-link" target="_blank" rel="noopener noreferrer">考试</a> <span class="cat-sep">·</span> <a href="https://www.h139.com/categories/government-services" class="h139-cat-link" target="_blank" rel="noopener noreferrer">政务</a> <span class="cat-sep">·</span> <a href="https://www.h139.com/categories/ecommerce-operations" class="h139-cat-link" target="_blank" rel="noopener noreferrer">购物</a> <span class="cat-sep">·</span> <a href="https://www.h139.com/categories/job-recruitment" class="h139-cat-link" target="_blank" rel="noopener noreferrer">求职</a> <span class="cat-sep">·</span> <a href="https://www.h139.com/categories/tv-live" class="h139-cat-link" target="_blank" rel="noopener noreferrer">电视</a> <span class="cat-sep">·</span> <a href="https://www.h139.com/categories/sports-events" class="h139-cat-link" target="_blank" rel="noopener noreferrer">体育</a> <span class="cat-sep">·</span> <a href="https://www.h139.com/categories/finance-securities" class="h139-cat-link" target="_blank" rel="noopener noreferrer">财经</a> <span class="cat-sep">·</span> <a href="https://www.h139.com/categories/webmail" class="h139-cat-link" target="_blank" rel="noopener noreferrer">邮箱</a> <span class="cat-sep">·</span> <a href="https://www.h139.com/categories/education-exam" class="h139-cat-link" target="_blank" rel="noopener noreferrer">教育</a> <span class="cat-sep">·</span> <a href="https://www.h139.com/categories/daily-office" class="h139-cat-link" target="_blank" rel="noopener noreferrer">办公</a> <span class="cat-sep">·</span> <a href="https://www.h139.com/categories/image-resources" class="h139-cat-link" target="_blank" rel="noopener noreferrer">素材</a> <span class="cat-sep">·</span> <a href="https://www.h139.com/categories/wallpapers" class="h139-cat-link" target="_blank" rel="noopener noreferrer">壁纸</a> <span class="cat-sep">·</span> <a href="https://www.h139.com/categories/tech-digital" class="h139-cat-link" target="_blank" rel="noopener noreferrer">数码</a> <span class="cat-sep">·</span> <a href="https://www.h139.com/categories/travel-trip" class="h139-cat-link" target="_blank" rel="noopener noreferrer">旅游</a> <span class="cat-sep">·</span> <a href="https://www.h139.com/categories/cars-motorcycles" class="h139-cat-link" target="_blank" rel="noopener noreferrer">汽车</a> <span class="cat-sep">·</span> <a href="https://www.h139.com/categories/real-estate" class="h139-cat-link" target="_blank" rel="noopener noreferrer">房产</a> <span class="cat-sep">·</span> <a href="https://xiazai.zol.com.cn/" class="h139-cat-link" target="_blank" rel="noopener noreferrer">下载</a> <span class="cat-sep">·</span> <a href="https://www.h139.com/categories/anime-comics" class="h139-cat-link" target="_blank" rel="noopener noreferrer">动漫</a></div>
  3. </div>
  4. <style>
  5. *{
  6.   box-sizing: border-box;
  7.   margin:0;
  8.   padding:0;
  9. }
  10. /* 外层卡片容器,圆角6px */
  11. .h139-banner-card{
  12.   width:100%;
  13.   border:1px solid #e8e8e8;
  14.   border-radius:6px;
  15.   background:#ffffff;
  16.   overflow:hidden;
  17. }
  18. .h139-banner-cats {
  19.   display: flex;
  20.   flex-direction: row;
  21.   flex-wrap: nowrap;
  22.   /* 平铺拉伸,剩余空间自动均匀分布在元素之间 */
  23.   justify-content: space-between;
  24.   align-items: center;
  25.   width: 100%;
  26.   /* 左右内边距15px,满足文字距离边框15px */
  27.   padding: 8px 15px;
  28.   overflow-x: auto;
  29.   overflow-y: hidden;
  30.   -webkit-overflow-scrolling: touch;
  31.   font-size: 14px;
  32.   line-height: 1.8;
  33.   min-height: 44px;
  34. }
  35. /*隐藏滚动条*/
  36. .h139-banner-cats::-webkit-scrollbar {
  37.   display: none;
  38. }
  39. /*分类链接*/
  40. .h139-cat-link {
  41.   position: relative;
  42.   display: flex;
  43.   align-items: center;
  44.   flex-shrink: 0;
  45.   color: #333;
  46.   text-decoration: none;
  47.   font-size: 14px;
  48.   padding: 3px 8px;
  49.   border-radius: 4px;
  50.   z-index: 1;
  51.   transition: color 0.3s ease;
  52.   white-space: nowrap;
  53. }
  54. /*独立分隔圆点,参与flex布局,真正处在两个分类空隙的正中间,垂直居中*/
  55. .cat-sep{
  56.   flex-shrink:0;
  57.   font-size:16px;
  58.   line-height:1;
  59.   opacity:0.75;
  60.   color:#333;
  61.   user-select:none;
  62. }
  63. /*hover背景动画*/
  64. .h139-cat-link::before {
  65.   content: "";
  66.   position: absolute;
  67.   inset: 0;
  68.   background-color: var(--theme-color,#4080ff);
  69.   border-radius: 4px;
  70.   z-index: -1;
  71.   transform: scaleY(0);
  72.   transform-origin: center center;
  73.   transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  74. }
  75. .h139-cat-link:hover::before {
  76.   transform: scaleY(1);
  77. }
  78. .h139-cat-link:hover {
  79.   color: #ffffff;
  80. }
  81. </style>
复制代码
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关注公众号

相关侵权、举报、投诉及建议等,请发 E-mail:admin@discuz.vip

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.|桂ICP备2026002529号-2

在本版发帖
关注公众号
返回顶部