效果如上图所示
教程:
1、B2主题设置,模块设置,首页,添加广告位模块
复制下面的代码添加即可
<span class="index_ads"> <a href="https://wpa.qq.com/msgrd?v=3&uin=84087680&site=qq&menu=yes" target="_blank" rel="nofollow"><img src="https://img.vlogforum.com/imgs/sys/ad_1200_150.jpg" alt="精品广告位"></a> <a href="https://wpa.qq.com/msgrd?v=3&uin=84087680&site=qq&menu=yes" target="_blank" rel="nofollow"><img src="https://img.vlogforum.com/imgs/sys/ad_1200_150.jpg" alt="精品广告位"></a> </span>
CSS样式
/*盾给网dungei.cc首页广告位样式开始*/
.index_ads{
display: block;
max-width: 100%;
margin-left: auto;
margin-right: auto;
padding: 8px 5px;
}
.index_ads a {
display: block;
float: left;
margin-bottom: 10px;
width: 50%;;
position: relative;
}
.index_ads a:before {
position: absolute;
content: " ";
width: 26px;
height: 1pc;
background: url(https://img.vlogforum.com/imgs/sys/ad_watermark.png);
right: 0;
font-size: 9pt;
text-align: center;
bottom: 0;
color: #fff;
}
.index_ads img {
width: 100%;
}
@media (max-width: 767px) {
.index_ads {
display: none
}
}
/*首页广告位样式结束*/