子比主题美化 - 添加缤纷彩色文字广告位代码

也想出现在这里? 联系我们
信息

网站添加一个文字广告菜单分类引导,就在网上看到这种虚线边框划过变色文字广告样式,感觉还是很不错的,网站基本上都可以用,因为这就两个代码,一个是HTML和CSS。

PC端时,代码为4个文字块一行,所以大家添加文字广告为4、8、12、16、24等 只要是4的倍数即可,当然推荐添加2行效果最好。

图片[1] - 子比主题美化 - 添加缤纷彩色文字广告位代码

代码如下

HTML代码

<div class="tp-ad-text1">
    <a href="https://bianyuanren.top/" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  title="大海资源库·dahkk.cn" target="_blank">大海资源库·dahkk.cn</a>
    <a href="https://bianyuanren.top/" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  title="大海资源库·dahkk.cn" target="_blank">大海资源库·dahkk.cn</a>
    <a href="https://bianyuanren.top/" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  title="大海资源库·dahkk.cn" target="_blank">大海资源库·dahkk.cn</a>
    <a href="https://bianyuanren.top/" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  title="大海资源库·dahkk.cn" target="_blank">大海资源库·dahkk.cn</a>
    <a href="https://bianyuanren.top/" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  title="大海资源库·dahkk.cn" target="_blank">大海资源库·dahkk.cn</a>
    <a href="https://bianyuanren.top/" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  title="大海资源库·dahkk.cn" target="_blank">大海资源库·dahkk.cn</a>
    <a href="https://bianyuanren.top/" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  title="大海资源库·dahkk.cn" target="_blank">大海资源库·dahkk.cn</a>
    <a href="https://bianyuanren.top/" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  title="大海资源库·dahkk.cn" target="_blank">大海资源库·dahkk.cn</a>
</div>

CSS代码

 .tp-ad-text1 {width:100%;padding-top:6px;box-sizing:border-box;overflow: hidden;}
  .tp-ad-text1 a {color:#7fba00;font-size:14px;line-height:38px;text-align:center;border:1px dashed rgba(0,0,0,.2);padding:0 3px;box-sizing:border-box;float:left;width:24%;height:38px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0 0.5% 6px;text-decoration:none;transition:all .6s;}
  .tp-ad-text1 a:hover {font-weight: bold;color:#fff!important;background:#7fba00;transition: all .6s;}
  .tp-ad-text1 a:nth-child(2n) {color:#f74e1e;}
  .tp-ad-text1 a:nth-child(2n):hover {background:#f74e1e;border-color: #f74e1e;}
  .tp-ad-text1 a:nth-child(3n) {color:#00a4ef;}
  .tp-ad-text1 a:nth-child(3n):hover {background:#00a4ef;border-color: #00a4ef;}
  .tp-ad-text1 a:nth-child(4n) {color:#009688;}
  .tp-ad-text1 a:nth-child(4n):hover {background:#009688;border-color: #009688;}
  .tp-ad-text1 a:nth-child(5n) {color:#FFEB3B;}
  .tp-ad-text1 a:nth-child(5n):hover {background:#FFEB3B;border-color: #FFEB3B;}
  .tp-ad-text1 a:nth-child(6n) {color:#ffb900;}
  .tp-ad-text1 a:nth-child(6n):hover {background:#ffb900;border-color: #ffb900;}
  .tp-ad-text1 a:nth-child(7n) {color:#0fc317;}
  .tp-ad-text1 a:nth-child(7n):hover {background:#0fc317;border-color: #0fc317;}
  .tp-ad-text1 a:nth-child(8n) {color:#E91E63;}
  .tp-ad-text1 a:nth-child(8n):hover {background:#E91E63;border-color: #E91E63;}
  .tp-ad-text1 a:nth-child(9n) {color:#fba78f;}
  .tp-ad-text1 a:nth-child(9n):hover {background:#fba78f;border-color: #fba78f;}
  .tp-ad-text1 a:nth-child(10n) {color:#13cf8f;}
  .tp-ad-text1 a:nth-child(10n):hover {background:#13cf8f;border-color: #13cf8f;}
  .tp-ad-text1 a:nth-child(11n) {color:#f74e1e;}
  .tp-ad-text1 a:nth-child(11n):hover {background:#f74e1e;border-color: #f74e1e;}
  .tp-ad-text1 a:nth-child(12n) {color:#ffb900;}
  .tp-ad-text1 a:nth-child(12n):hover {background:#ffb900;border-color: #ffb900;}
  .tp-ad-text1 a:nth-child(13n) {color:#fba78f;}
  .tp-ad-text1 a:nth-child(13n):hover {background:#fba78f;border-color: #fba78f;}
  .tp-ad-text1 a:nth-child(14n) {color:#f74e1e;}
  .tp-ad-text1 a:nth-child(14n):hover {background:#f74e1e;border-color: #f74e1e;}
  .tp-ad-text1 a:nth-child(15n) {color:#7fba00;}
  .tp-ad-text1 a:nth-child(15n):hover {background:#7fba00;border-color: #7fba00;}
  .tp-ad-text1 a:nth-child(16n) {color:#0fc317;}
  .tp-ad-text1 a:nth-child(16n):hover {background:#0fc317;border-color: #0fc317;}
  .tp-ad-text1 a:nth-child(17n) {color:#0517c2;}
  .tp-ad-text1 a:nth-child(17n):hover {background:#0517c2;border-color: #0517c2;}
  .tp-ad-text1 a:nth-child(18n) {color:#13cf8f;}
  .tp-ad-text1 a:nth-child(18n):hover {background:#13cf8f;border-color: #13cf8f;}
  .tp-ad-text1 a:nth-child(19n) {color:#ffb900;}
  .tp-ad-text1 a:nth-child(19n):hover {background:#ffb900;border-color: #ffb900;}
  .tp-ad-text1 a:nth-child(20n) {color:#f74e1e;}
  .tp-ad-text1 a:nth-child(20n):hover {background:#f74e1e;border-color: #f74e1e;}
  @media screen and (max-width: 1400px){
    .tp-ad-text1 a{
      width: 24%;
    }
  }

子比主题的话直接把HTML往小工具一丢,然后CSS放到自定义CSS即可,其他网站你可以随便研究一下!

© 版权声明
THE END
喜欢就支持一下吧
点赞14 分享
有问题也可以在评论区留言,站长QQ:1240555208 抢沙发
头像
点击夸一夸可以快速回复哦~
提交
头像

昵称

夸夸
夸夸
还有吗!没看够!
取消
昵称表情代码

    暂无评论内容