学习定有收获
努力成为大神

精美实用!网站自适应图片文字广告位代码分享

WordPress 原创插件 国人习惯、简约实用、容易上手【点击了解】

网站广告作为网站收入的重要源头,其展示效果至关重要。一个高格调的广告展示,能瞬间提升网站的整体气质,让网站显得更加大气上档次。今天,小编就毫不藏私地和大家分享一套精心收藏的网站自适应图片文字广告位代码,特别适合各位站长朋友使用。

<div class="ad">
<!--图片横幅广告-->
<a href="https://dsdiss.com" target="_blank" ><img src="https://dsdiss.com/wp-content/uploads/logo-dark%E5%89%AF%E6%9C%AC.png" width="100%"></a>
<!--自适应文字广告-->
<li><a href="https://dsdiss.com" target="_blank" style="line-height:
60px;height:60px;color:#fff;background:#01AAED;text-align:center;font-size
:24px;">广告招商 虚位以待</a></li>
<li> <a href="https://dsdiss.com" target="_blank" style="line-height:
60px; height:60px ;color:#fff; background:#2F4056; text-align:center;
font-size:24px;" >广告招商 虚位以待</a></li>
</div>

<div class="txtguanggao"> <a href="https://dsdiss.com" target="_blank" class="dh">超低价文字广告位</a> <a href="https://dsdiss.com" target="_blank" class="dh">超低价文字广告位</a> <a href="https://dsdiss.com" target="_blank" class="dh">超低价文字广告位</a> <a href="https://dsdiss.com" target="_blank" class="dh">超低价文字广告位</a> <a href="https://dsdiss.com" target="_blank" class="dh">超低价文字广告位</a> <a href="https://dsdiss.com" target="_blank" class="dh">超低价文字广告位</a> <a href="https://dsdiss.com" target="_blank" class="dh">超低价文字广告位</a> <a href="https://dsdiss.com" target="_blank" class="dh">超低价文字广告位</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;} .ad li{width:100%;} } /新增文字广告/ .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; } a {

text-decoration: none;

} .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>

内容仅供参考:大神建站 - WordPress插件开发 » 精美实用!网站自适应图片文字广告位代码分享

评论 2

  1. #-9

    读这文章,就像和高手过招,招招精彩,收获超多!

  2. #-8

    太赞啦,作者以后出文,我必当 “头号粉丝”,紧追不舍!

登录

找回密码

注册