首页 网页素材 网站首页添加幻灯和广告位自适应代码 2019年5月13日 0条评论 网站首页添加幻灯和广告位自适应代码 内容 相关 如图所示,代码自适应,测试适用于emlog大前段的模板,直接复制粘贴到log_list.php即可, 其他的可以直接测试,如果效果不行欢迎咨询站长,谢谢合作, 下面是代码: <div id="qgg_banner" class="carousel slide" data-ride="carousel" style="touch-action: pan-y; user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> <ol class="carousel-indicators"><li data-target="#qgg_banner" data-slide-to="0" class=""></li><li data-target="#qgg_banner" data-slide-to="1" class="active"></li></ol> <div class="carousel-inner" role="listbox"><div class="item"> <img src="http://tese.2017quan.top//201920190505111922.jpg"> <div class="qgg_banner_wenan"> <h1 class="qgg_banner_caption">易赚线报网 | www.yz686.cn</h1> <p class="qgg_banner_description">易赚线报网(yz686.cn)是一个专注薅羊毛免费赚钱项目平台,为羊毛党提供最新的薅羊毛赚钱线报、薅羊毛赚钱攻略、薅羊毛资讯的薅羊毛线报网站,让羊毛党在网上轻松赚到钱!</p> <div class="qgg_banner_button"> <a class="qgg_banner_button1" target="_blank" href="http://www.yz686.cn/" style=" "> <span>官网</span> </a> <a class="qgg_banner_button2" target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=3027146017&site=qq&menu=yes" style=" "> <span>联系我们</span> </a> </div> </div> </div><div class="item active"> <img src="http://tese.2017quan.top//201920190505112000.jpg"> <div class="qgg_banner_wenan"> <h1 class="qgg_banner_caption">.</h1> <p class="qgg_banner_description"></p> <div class="qgg_banner_button"> <a class="qgg_banner_button1" target="_blank" href="http://www.52xianbao.com/zx" style=" "> <span>精选羊毛</span> </a> <a class="qgg_banner_button2" target="_blank" href="http://www.52xianbao.com/zx" style=" "> <span>点击查看</span> </a> </div> </div> </div></div> <a class="left carousel-control" href="#qgg_banner" role="button" data-slide="prev"><i class="fa fa-angle-left"></i></a> <a class="right carousel-control" href="#qgg_banner" role="button" data-slide="next"><i class="fa fa-angle-right"></i></a> </div> <style>.container { position: relative; margin: 0 auto; max-width: 1200px; padding: 0; }ul { list-style: none; } .article-content h2{ font-size:18px; font-weight:bold; border-bottom: 1px solid; padding: 5px 15px; border-left: 8px solid; margin:18px 0px 18px -20px; overflow: hidden; } @media (max-width: 1200px){ .focusbanner{display: none;} } /** 顶部Banneræ ·å¼*/ #qgg_banner{ margin: 0 0 30px; z-index: 0; width: 100%; height: 100%; } .qgg_banner_control{ position: absolute; top: 36%; margin: 0px; height: 88px; line-height: 88px; } #qgg_banner .carousel-inner .item img{ border-radius: 0px; } .qgg_banner_wenan{ position: absolute; top: 5%; width: 80%; height: 90%; right:10%; left:10%; } .qgg_banner_caption{ position: absolute; z-index: 10; top:10%; width: 92%; padding:0 16%; color: #fff; font-size: 30px; text-align: center; overflow:hidden; white-space: nowrap; text-overflow: ellipsis; } .qgg_banner_description{ position: absolute; z-index: 10; top:36%; height: 48px; width: 92%; margin:10px 0px; padding:0 12%; color: #fff; font-size: 16px; overflow:hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-align: center; } .qgg_banner_button{ position: absolute; z-index: 10; top: 70%; padding: 0px 36%; } .qgg_banner_button1{ float:left; vertical-align: middle; width: auto; margin:9px; padding: 9px 30px; background: #45b6f7; color: #FFF; border:1px solid #45b6f7; border-radius: 120px; font-size: 16px; font-weight: bold; } .qgg_banner_button2{ float:left; width: auto; margin: 9px; padding: 9px 30px; background: #45b6f7; color: #FFF; border:1px solid #45b6f7; border-radius: 120px; font-size: 16px; font-weight: bold; } .qgg_banner_button a:hover{ color:#FFF; font-size:15px; border:0px solid #45b6f7; } .carousel-indicators{ left:51%; width:50%} @media (max-width: 1200px){ #qgg_banner{display: none;} } /* ebox NPIE.NET====仿themebetter======= */ .eboxx { overflow: hidden; font-size: 12px; border: 1px solid #EAEAEA; text-align: center; background-color: #fff; margin-bottom: 20px; } .eboxx h4 { font-size: 16px; color: #333; margin: 15px 0; font-weight:bold } .eboxx-i { position: relative; float: left; width: 20%; padding: 20px; background-color: #fff; color: #777; } .eboxx-01, .eboxx-02, .eboxx-03, .eboxx-04 { border-right: 2px solid #eee; } .eboxx-i:hover {background-color: #F9F9F9;} .eboxx-i p {height: 38px;overflow: hidden;color: #666;font-size: 14px;} @media (max-width: 1024px) { .eboxx .btn-default {display: none;} .eboxx h4 {height: 20px;overflow: hidden;} } @media (max-width: 860px) { .eboxx .eboxx-100 {display: none;} .eboxx-i {width: 25%;} .eboxx-04 {border-right: none;} } @media (max-width: 640px) { .eboxx-i {width: 50%;} .eboxx-01 {border-bottom: 2px solid #eee;} .eboxx-02 {border-right: none;border-bottom: 2px solid #eee;} } @media (max-width: 480px) { .eboxx-i {padding: 10px 15px 15px;} .eboxx h4 {margin-bottom: 0;} .eboxx-i p {margin: 5px 0} } /** 修改å•ä¸€å¯¼èˆªèœå•é¢œè‰² */ .menu-item-highlight>a { color: #ff5e52 !important; } </style><div class="container"> <ul class="eboxx"> <li class="eboxx-i eboxx-01"> <p class="pos_abs"><img title="薅羊毛" src="http://tese.2017quan.top//201920190428212801.jpg"></p> <h4> 5天收入90000+</h4> <p>刚测试完,5天收入90000+,快速赚钱的秘诀!</p> <a class="btn btn-sm btn-primary" target="_blank" rel="nofollow" href="http://www.ulink.vip">广告</a> <a class="btn btn-sm btn-default" target="_blank" rel="nofollow" href="http://www.ulink.vip">薅羊毛</a> </li> <li class="eboxx-i eboxx-02"> <p class="pos_abs"><img title="薅羊毛" src="http://tese.2017quan.top//201920190428212801.jpg"></p> <h4>纯正规项目</h4> <p>支付宝砸30亿投资刷脸</p> <a class="btn btn-sm btn-primary" target="_blank" rel="nofollow" href="http://www.52xianbao.com/16886.html">查看</a> <a class="btn btn-sm btn-default" target="_blank" rel="nofollow" href="http://www.52xianbao.com/16886.html">薅羊毛</a> </li> <li class="eboxx-i eboxx-03"> <p class="pos_abs"><img title="薅羊毛" src="http://tese.2017quan.top//201920190428212801.jpg"></p> <h4>薅羊毛专业团队</h4> <p>网络兼职,赚钱项目,加QQ3003428844指导操作</p> <a class="btn btn-sm btn-primary" target="_blank" rel="nofollow" href="https://www.weibo.com/ttarticle/p/show?id=2309404371175106022292">广告</a> <a class="btn btn-sm btn-default" target="_blank" rel="nofollow" href="https://www.weibo.com/ttarticle/p/show?id=2309404371175106022292">薅羊毛</a> </li> <li class="eboxx-i eboxx-04"> <p class="pos_abs"><img title="薅羊毛" src="http://tese.2017quan.top//201920190428212801.jpg"></p> <h4>夸克链信</h4> <p>新用户实名每天领0.4个币,目前一币价值16元</p> <a class="btn btn-sm btn-primary" target="_blank" rel="nofollow" href="http://www.52xianbao.com/21234.html">查看</a> <a class="btn btn-sm btn-default" target="_blank" rel="nofollow" href="http://www.52xianbao.com/21234.html">薅羊毛</a> </li> <li class="eboxx-i eboxx-100"> <p class="pos_abs"><img title="薅羊毛" src="http://tese.2017quan.top//201920190428212801.jpg"></p> <h4>邮政手机银行</h4> <p>开通领30或50元话费</p> <a class="btn btn-sm btn-primary" target="_blank" rel="nofollow" href="http://www.52xianbao.com/20275.html">查看</a> <a class="btn btn-sm btn-danger" target="_blank" rel="nofollow" href="http://www.52xianbao.com/20275.html">薅羊毛</a> </li> </ul> </div><div class="container"> <ul class="eboxx"> <li class="eboxx-i eboxx-01"> <p class="pos_abs"><img title="薅羊毛" src="http://tese.2017quan.top//201920190428212801.jpg"></p> <h4>棋牌大师</h4> <p>下载登陆送6元,玩游戏日赚百元</p> <a class="btn btn-sm btn-primary" target="_blank" rel="nofollow" href="http://www.52xianbao.com/21108.html">薅羊毛</a> <a class="btn btn-sm btn-default" target="_blank" rel="nofollow" href="http://www.52xianbao.com/21108.html">手机棋牌</a> </li> <li class="eboxx-i eboxx-02"> <p class="pos_abs"><img title="薅羊毛" src="http://tese.2017quan.top//201920190428212801.jpg"></p> <h4>WJK</h4> <p>推荐好友送10元红包,满一百元提现</p> <a class="btn btn-sm btn-primary" target="_blank" rel="nofollow" href="http://www.52xianbao.com/20907.html">查看</a> <a class="btn btn-sm btn-default" target="_blank" rel="nofollow" href="http://www.52xianbao.com/20907.html">薅羊毛</a> </li> <li class="eboxx-i eboxx-03"> <p class="pos_abs"><img title="薅羊毛" src="http://tese.2017quan.top//201920190428212801.jpg"></p> <h4>喵屋O</h4> <p>全网最新最高的悬赏做任务赚佣金平台</p> <a class="btn btn-sm btn-primary" target="_blank" rel="nofollow" href="http://www.52xianbao.com/21244.html">点击</a> <a class="btn btn-sm btn-default" target="_blank" rel="nofollow" href="http://www.52xianbao.com/21244.html">薅羊毛</a> </li> <li class="eboxx-i eboxx-04"> <p class="pos_abs"><img title="薅羊毛" src="http://tese.2017quan.top//201920190428212801.jpg"></p> <h4>趣闲赚</h4> <p>新用户简单撸2元,秒到账</p> <a class="btn btn-sm btn-primary" target="_blank" rel="nofollow" href="http://zhuanke.jy96.cn/17719">点击</a> <a class="btn btn-sm btn-default" target="_blank" rel="nofollow" href="http://zhuanke.jy96.cn/17719">薅羊毛</a> </li> <li class="eboxx-i eboxx-100"> <p class="pos_abs"><img title="薅羊毛" src="http://tese.2017quan.top//201920190428212801.jpg"></p> <h4>信用卡</h4> <p>申请推广信用卡赚钱,佣金50—450元</p> <a class="btn btn-sm btn-primary" target="_blank" rel="nofollow" href="http://www.52xianbao.com/20728.html">查看</a> <a class="btn btn-sm btn-danger" target="_blank" rel="nofollow" href="http://www.52xianbao.com/20728.html">薅羊毛</a> </li> </ul> </div> 运行代码清空代码复制代码 点赞  (1) 打赏 分享 支付宝扫一扫 微信扫一扫 企鹅扫一扫