- N +

html5手机全屏广告代码大全 html文字广告代码

html5手机全屏广告代码大全 html文字广告代码原标题:html5手机全屏广告代码大全 html文字广告代码

导读:

先看看手机端效果图吧...

先看看手机端效果图吧


html5手机全屏广告代码大全 html文字广告代码_html5手机全屏广告代码大全


 电脑端

html5手机全屏广告代码大全 html文字广告代码_自适应_02


 上边是图片广告位,下边是文字广告位,都是自适应的。


图片觉得不直观的可以去网站看看


代码从网上扒的,自己也修改了一下,更美观、也更适应网站。


 


一个好的广告位不仅不会拉低网站的颜值,还会增加广告主选择你的机会。


 


使用方法:外观-小工具-自定义html,把代码复制进去,放在想要放置的地方。


 


如果有大佬可以打包成小工具最好了,毕竟我只会一点点前端,后端不懂得。


 


代码:


<div class="ad">

<!--图片横幅广告-->

<a href="https://xiegang.wang/xiegangqingnianxianb-2" target="_blank" ><img src="https://cdn.xiegang.wang/wp-content/uploads/2022/09/2c099f6878013737.webp"></a>

<!--自适应文字广告-->

<li><a href="https://xiegang.wang/guanggaotoufang" target="_blank" style="line-height:60px;height:60px;color:#fff;background:#01AAED;text-align:center;font-size:24px;">广告招商 虚位以待</a></li>

<li> <a href="https://xiegang.wang/guanggaotoufang"  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://xiegang.wang/guanggaotoufang" target="_blank" class="dh">超低价文字广告位</a>

<a href="https://xiegang.wang/guanggaotoufang" target="_blank" class="dh">超低价文字广告位</a>

<a href="https://xiegang.wang/guanggaotoufang" target="_blank" class="dh">超低价文字广告位</a>

<a href="https://xiegang.wang/guanggaotoufang" target="_blank" class="dh">超低价文字广告位</a>

<a href="https://xiegang.wang/guanggaotoufang5" target="_blank" class="dh">超低价文字广告位</a>

<a href="https://xiegang.wang/guanggaotoufang" target="_blank" class="dh">超低价文字广告位</a>

<a href="https://xiegang.wang/guanggaotoufang" target="_blank" class="dh">超低价文字广告位</a>

<a href="https://xiegang.wang/guanggaotoufang" 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;

}

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


可以直接复制在一起,也可以吧html和css分开。


 


 


本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。


有好的文章希望我们帮助分享和推广,猛戳这里我要投稿

返回列表
上一篇:
下一篇:

发表评论中国互联网举报中心

快捷回复:

    评论列表 (暂无评论,共79人参与)参与讨论

    还没有评论,来说两句吧...