导航首页 » 技术教程 » 自适应资源网站文字广告位代码
自适应资源网站文字广告位代码

一个好看自适应的文字广告位代码,如果不需要太多位置可适当删减代码。

<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%;
		}
	}
.ads.ads_w {
    max-height: 100% !important;
}
  .ggimg {
        width: 100%;
        border-radius: 4px;
    }

    .ggimg a {
        display: block;
        margin: 0;
        width: 50%;
        height: 60px;
        float: left;
    }

    .ggimg a img {
        width: 100%;
        height: 100%;
    }

    @media only screen and (max-width:465px) {
        .ggimg a {
            width: calc(50% - 4px);
        }
    }
</style>
<div>
     <a href="https://www.qsdh.top/" target="_blank"><img src="https://www.g3cg.com/guangao/dhw.gif"width="100%" height="60"></a>
     <a href="https://www.bygoukai.com/" target="_blank"><img src="https://fc.sinaimg.cn/large/9d9812e7gy1hice03q1bgg20qo01odh3.jpg"width="100%" height="60"></a>
     <a href="http://wpa.qq.com/msgrd?v=3&uin=615806139&site=qq&menu=yes" target="_blank"><img src="https://www.g3cg.com/guangao/69f31692277234.png"width="100%" height="60"></a>
</div>
<div class="ggimg"> 
     <a href="http://www.fnkuaiyan.cn/" target="_blank"><img src="/guangao/fn.png"width="100%" height="100"></a>
    <a href="http://xzkkk.com" target="_blank"><img src="http://zy.9hww.com/gg/xzkkk.gif"width="100%" height="100"></a>
    <a href="https://www.34pe.cn/" target="_blank"><img src="https://www.34pe.cn/static/image/pdzyw.gif"width="100%" height="100"></a>
    <a href="https://www.g3cg.com/" target="_blank"><img src="/guangao/2023092816291155.gif"width="100%" height="100"></a>
    <a href="http://www.yydhw.com/" target="_blank"><img src="http://zyfby.com/img/yydhw.gif"width="100%" height="100"></a>
    <a href="http://wpa.qq.com/msgrd?v=3&uin=615806139&site=qq&menu=yes" target="_blank"><img src="/guangao/6bbf2c745391f.png"width="100%" height="100"></a>
    <a href="http://wpa.qq.com/msgrd?v=3&uin=615806139&site=qq&menu=yes" target="_blank"><img src="/guangao/202307251690277249170501.gif"width="100%" height="100"></a>
     <a href="http://wpa.qq.com/msgrd?v=3&uin=615806139&site=qq&menu=yes" target="_blank"><img src="/guangao/1.png"width="100%" height="100"></a>
</div>
            <div class="tp-ad-text1">
                <a href="https://www.kps6.com" title="看片神影视" target="_blank">看片神影视</a>
                <a href="http://www.qsdh.top" title="千神导航" target="_blank">千神导航</a>
                <a href="https://www.g3cg.com" title="广告位/60/月" target="_blank">广告位/60/月</a>
                <a href="https://www.g3cg.com" title="广告位/60/月" target="_blank">广告位/60/月</a>
                <a href="https://www.g3cg.com" title="广告位/60/月" target="_blank">广告位/60/月</a>
                <a href="https://www.g3cg.com" title="广告位/60/月" target="_blank">广告位/60/月</a>
                <a href="https://www.g3cg.com" title="广告位/60/月" target="_blank">广告位/60/月</a>
                <a href="https://www.g3cg.com" title="广告位/60/月" target="_blank">广告位/60/月</a>
                <a href="https://www.g3cg.com" title="广告位/60/月" target="_blank">广告位/60/月</a>
                <a href="http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=YlLXJqEYsQD2DpZAkdX9HA2Tn0a55223&authKey=caexUuXTzeqW5A8B9LMUZ5pynARaI3uNvxAIEzJ0B8s1T%2BPhxYDnkONA48hbNB0E&noverify=0&group_code=775641772" title="广告位/60/月" target="_blank" title="同款网站搭建" target="_blank">同款网站搭建</a>
                <a href="https://www.g3cg.com" title="广告位/60/月" target="_blank">广告位/60/月</a>
                <a href="https://www.g3cg.com" title="广告位/60/月" target="_blank">广告位/60/月</a>
                <a href="https://www.g3cg.com" title="广告位/60/月" target="_blank">广告位/60/月</a>
                <a href="https://www.g3cg.com" title="广告位/60/月" target="_blank">广告位/60/月</a>
                <a href="https://www.g3cg.com" title="广告位/60/月" target="_blank">广告位/60/月</a>
                <a href="https://www.g3cg.com" title="广告位/60/月" target="_blank">广告位/60/月</a>
                <a href="https://www.g3cg.com" title="广告位/60/月" target="_blank">广告位/60/月</a>
                <a href="http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=YlLXJqEYsQD2DpZAkdX9HA2Tn0a55223&authKey=caexUuXTzeqW5A8B9LMUZ5pynARaI3uNvxAIEzJ0B8s1T%2BPhxYDnkONA48hbNB0E&noverify=0&group_code=775641772" title="同款网站搭建" target="_blank">同款网站搭建</a>
                <a href="https://www.g3cg.com" title="广告位/60/月" target="_blank">广告位/60/月</a>
                <a href="https://www.g3cg.com" title="广告位/60/月" target="_blank">广告位/60/月</a>
                <a href="https://www.g3cg.com" title="广告位/60/月" target="_blank">广告位/60/月</a>
                <a href="https://www.g3cg.com" title="广告位/60/月" target="_blank">广告位/60/月</a>
                <a href="https://www.g3cg.com" title="广告位/60/月" target="_blank">广告位/60/月</a>
                <a href="https://www.g3cg.com" title="广告位/60/月" target="_blank">广告位/60/月</a>
            </div>