这个广告位感觉还不错,这里做一下记录。流量大了可以接点广告,维持维持生计,不至于让明年的服务器费用没着落,电脑端和手机端同步显示,上面两条横幅图片广告,下面两个小点的横幅图片广告,加下面8个位置的文字广告,不够的自己还可以加,代码自己可以修改修改,适用于大部分系统,下面我拿子比主题进行演示。
PC端:
![图片[1]-子比主题美化-给网站添加自适应双端显示广告位-梦都歌-精品资源社区,梦都歌资源网](https://img.mduge.com/i/2025/01/15/678744e81e6ce.png)
教程开始
外观—小工具—自定义HTML,把代码放到你想放的位置,比如首页或者文章页或者其它页面,我放到了首页顶部全宽度,代码如下:
代码来源于网络,大图广告位有点问题不自适应,本站已经修改过,完全没问题
<div class="puock-text p-block t-md ad-global-top"> <div class="ad">
<!--首页大横幅-->
<div class="pay-vip">
<a href="javascript:;" rel="nofollow" title="首页大横幅会员开通"><img src="https://bu.dusays.com/2024/06/12/6668b87c02aec.png" width="1800" height="65"></a>
</div>
<a href="链接" target="_blank" rel="nofollow" title="我爱代挂"><img src="https://bu.dusays.com/2024/06/12/6668b8cc1b2a5.png" width="1800" height="65"></a>
<a href="链接" target="_blank" rel="nofollow" title="发现一个广告位赶紧拿下 Fuck!"><img src="https://bu.dusays.com/2024/06/12/6668b912a151e.png" width="1800" height="65"></a>
<!--首页小横幅-->
<li>
<a href="链接" target="_blank" title="首页小横幅"><img src="https://img.mduge.com/i/2025/01/15/678726930fb75.png" width="1800" height="65" alt="开始20250115-20250215"></a>
</li>
<li>
<a href="链接" target="_blank" title="首页小横幅"><img src="https://img.mduge.com/i/2025/01/15/678726930fb75.png" width="1800" height="65" alt="开始20250115-20250215"></a>
</li>
</div>
<!-- 文字自适应 -->
<div class="txtguanggao">
<a href="链接" target="_blank" rel="nofollow" class="dh">超低价文字广告位5元/月</a>
<a href="链接" target="_blank" rel="nofollow" class="dh">超低价文字广告位5元/月</a>
<a href="链接" target="_blank" rel="nofollow" class="dh">超低价文字广告位5元/月</a>
<a href="链接" target="_blank" rel="nofollow" class="dh">超低价文字广告位5元/月</a>
<a href="链接" target="_blank" rel="nofollow" class="dh">超低价文字广告位5元/月</a>
<a href="链接" target="_blank" rel="nofollow" class="dh">超低价文字广告位5元/月</a>
<a href="链接" target="_blank" rel="nofollow" class="dh">超低价文字广告位5元/月</a>
<a href="链接" target="_blank" rel="nofollow" class="dh">超低价文字广告位5元/月</a></div>
<style>/**广告**/.ad{background:#fff;overflow:hidden;clear:both;border-radius: 6px;}.ad a{margin:5px;display:block;border-radius:3px;}.ad img{max-width:100%;}.ad li{float:left;width:50%;list-style:none;}@media(max-width:999px) {.ad{margin: 0 0 10px 0;}}/**新增文字广告**/.txtguanggao{ width: 100%; overflow: hidden; display: block; box-shadow: 0 1px 2px 0 rgba(0,0,0,.05);}.txtguanggao a{ width: calc((100% - 20px) / 4); float: left; border-radius: 2px; line-height: 35.35px; height: 35.35px; text-align: center; font-size: 14px; color: #fff; display: inline-block; background-color: rgb(255, 153, 159); margin: 2.5px; transition-duration: .3s;}.txtguanggao a:nth-child(1) { background-color: #dc3545;}.txtguanggao a:nth-child(2) { background-color: #007bff;}.txtguanggao a:nth-child(3) { background-color: #28a745;}.txtguanggao a:nth-child(4) { background-color: #ffc107;}.txtguanggao a:nth-child(5) { background-color: #28a745;}.txtguanggao a:nth-child(6) { background-color: #ffc107;}.txtguanggao a:nth-child(7) { background-color: #dc3545;}.txtguanggao a:nth-child(8){ background-color: #007bff;}.txtguanggao a:hover{background:#FF2805;color:#FFF}@media screen and (max-width: 1000px) {.txtguanggao a{ width: calc((100% - 10px) / 2); float: left; border-radius: 2px; line-height: 35.35px; height: 35.35px; text-align: center; font-size: 14px; color: #fff; display: inline-block; background-color: rgb(255, 153, 159); margin: 2.5px; transition-duration: .3s;}} @media screen and (min-width: 1000px) { .txtguanggao a{ width: calc((100% - 20px) / 4); }}</style> </div>
感谢您的来访,获取更多精彩文章请收藏本站。

暂无评论内容