缤纷彩色文字广告代码/文字广告代码美化版 - 汇站网

缤纷彩色文字广告代码/文字广告代码美化版

2022-09-17 0 1,065

js 代码描述:

如果你想在你的网站上添加一个类似文字广告的菜单分类指南,在其他网站上看到这种虚线边框跨越变色文字广告样式还是很不错的。写一份,分享给大家!

用 PC 的时候码是每行 8 个文字块,H5 是每行 4 个文字码,所以你可以添加文字广告为 8,16,24…只要它们是 8 的倍数。当然,建议加 2 行效果最好。

考虑到大家的网站都有黑暗模式,所以在这方面做了简单的优化,适合白天和黑夜模式。

代码如下:

<style type="text/css">
	.tp-ad-text1 {width:100%;padding-top:6px;box-sizing:border-box;overflow: hidden;background: rgba(255,255,255,.2);}
	.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:11.5%;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:#0517c2;}
	.tp-ad-text1 a:nth-child(4n):hover {background:#0517c2;border-color: #0517c2;}
	.tp-ad-text1 a:nth-child(5n) {color:#601165;}
	.tp-ad-text1 a:nth-child(5n):hover {background:#601165;border-color: #601165;}
	.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:#601165;}
	.tp-ad-text1 a:nth-child(8n):hover {background:#601165;border-color: #601165;}
	.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: 1198px){
		.tp-ad-text1 a{
			width: 24%;
		}
	}
</style>

或者

&lt;div class="tp-ad-text1"&gt;
    &lt;a href="http://baidu.com/" title="百变鹏仔" target="_blank"&gt;百变鹏仔&lt;/a&gt;
    &lt;a href="http://baidu.com/" title="百变鹏仔" target="_blank"&gt;百变鹏仔&lt;/a&gt;
    &lt;a href="http://baidu.com/" title="百变鹏仔" target="_blank"&gt;百变鹏仔&lt;/a&gt;
    &lt;a href="http://baidu.com/" title="百变鹏仔" target="_blank"&gt;百变鹏仔&lt;/a&gt;
    &lt;a href="http://baidu.com/" title="百变鹏仔" target="_blank"&gt;百变鹏仔&lt;/a&gt;
    &lt;a href="http://baidu.com/" title="百变鹏仔" target="_blank"&gt;百变鹏仔&lt;/a&gt;
    &lt;a href="http://baidu.com/" title="百变鹏仔" target="_blank"&gt;百变鹏仔&lt;/a&gt;
    &lt;a href="http://baidu.com/" title="百变鹏仔" target="_blank"&gt;百变鹏仔&lt;/a&gt;
    &lt;a href="http://baidu.com/" title="百变鹏仔" target="_blank"&gt;百变鹏仔&lt;/a&gt;
    &lt;a href="http://baidu.com/" title="百变鹏仔" target="_blank"&gt;百变鹏仔&lt;/a&gt;
    &lt;a href="http://baidu.com/" title="百变鹏仔" target="_blank"&gt;百变鹏仔&lt;/a&gt;
    &lt;a href="http://baidu.com/" title="百变鹏仔" target="_blank"&gt;百变鹏仔&lt;/a&gt;
    &lt;a href="http://baidu.com/" title="百变鹏仔" target="_blank"&gt;百变鹏仔&lt;/a&gt;
    &lt;a href="http://baidu.com/" title="百变鹏仔" target="_blank"&gt;百变鹏仔&lt;/a&gt;
    &lt;a href="http://baidu.com/" title="百变鹏仔" target="_blank"&gt;百变鹏仔&lt;/a&gt;
    &lt;a href="http://baidu.com/" title="百变鹏仔" target="_blank"&gt;百变鹏仔&lt;/a&gt;
    &lt;a href="http://baidu.com/" title="百变鹏仔" target="_blank"&gt;百变鹏仔&lt;/a&gt;
    &lt;a href="http://baidu.com/" title="百变鹏仔" target="_blank"&gt;百变鹏仔&lt;/a&gt;
    &lt;a href="http://baidu.com/" title="百变鹏仔" target="_blank"&gt;百变鹏仔&lt;/a&gt;
    &lt;a href="http://baidu.com/" title="百变鹏仔" target="_blank"&gt;百变鹏仔&lt;/a&gt;
    &lt;a href="http://baidu.com/" title="百变鹏仔" target="_blank"&gt;百变鹏仔&lt;/a&gt;
    &lt;a href="http://baidu.com/" title="百变鹏仔" target="_blank"&gt;百变鹏仔&lt;/a&gt;
    &lt;a href="http://baidu.com/" title="百变鹏仔" target="_blank"&gt;百变鹏仔&lt;/a&gt;
   
&lt;/div&gt;

 

js 代码效果图:

缤纷彩色文字广告代码/文字广告代码美化版

缤纷彩色文字广告代码/文字广告代码美化版

转载请注明:汇站网 » 缤纷彩色文字广告代码/文字广告代码美化版

收藏 (0)

微信扫一扫

支付宝扫一扫

点赞 (0)

感谢您的来访,获取更多精彩资源请收藏本站。

本站声明

本资源仅用于个人学习和研究使用,禁止用于任何商业环境!

 1.  本网站名称:汇站网
 2.  本站永久网址:https://www.huizhanii.com/
 3.  本站所有资源来源于网友投稿和高价购买,所有资源仅对编程人员及源代码爱好者开放下载做参考和研究及学习,本站不提供任何技术服务!
 4.  未经原版权作者许可,禁止用于任何商业环境,任何人不得擅作它用,下载者不得用于违反国家法律,否则发生的一切法律后果自行承担!
 5.  为尊重作者版权,请在下载24小时内删除!请购买原版授权作品,支持你喜欢的作者,谢谢!
 6.  若资源侵犯了您的合法权益, 请持您的版权证书和相关原作品信息来信通知我们请来信     通知我们我们会及时删除,给您带来的不便,我们深表歉意!
 7.  如下载链接失效、广告或者压缩包问题请联系站长处理!
 8.  如果你也有好源码或者教程,可以发布到网站,分享有金币奖励和额外收入!
 9.  本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
 10.  因源码具有可复制性,一经赞助 ,不得以任何形式退款。
 11.  更多详情请点击查看

汇站网 网页代码 缤纷彩色文字广告代码/文字广告代码美化版 https://www.huizhanii.com/30047.html

汇站

站长资源下载中心-找源码上汇站

常见问题
  • 如果付款后没有弹出下载页面,多刷新几下,有问题联系客服!
查看详情
  • 本站所有资源版权均属于原作者所有,这里所提供资源均只能用于参考学习用,请勿直接商用。若由于商用引起版权纠纷,一切责任均由使用者承担。
查看详情

相关文章

发表评论
暂无评论
  随机评论 表情开关按钮图片
表情表情表情表情表情表情表情表情表情表情表情表情表情表情表情表情表情表情表情表情表情表情表情表情表情表情表情表情表情表情表情表情表情表情表情表情表情表情表情
登录后评论
联系官方客服

为您解决烦忧 - 24小时在线 专业服务

(汇站网)一个专注站长资源的平台网站,提供最新的网站模板和整站源码,内容包含各类精品网页模板,企业网站模板,网站模板,DIV+CSS模板,织梦模板,帝国cms模板,discuz模板,wordpress模板,个人博客论坛模板,上千种免费网页模板下载尽在汇站网.找源码上汇站.huizhanii.com