### [网站广告位代码6格、横幅2个、横幅1个](https://wws.ysu2.com/article/130869) **Published:** 2023-12-04T05:27:36 **Author:** gao19970828 **Excerpt:** 代码: [content_hide] <div class=”tengxuanw top-ad ad”> <a href=”https://sjsdhw.com/” rel=”nofollow” target=”_blan  代码: \[content\_hide\]
\[/content\_hide\] \[content\_hide\] /\*首页横幅广告\*/ .index-top-ad{overflow:hidden;margin:-12px auto -12px;padding:10px 10px 6px;width:100%;background:#fff} .index-top-ad a{position:relative;float:left;display:block;margin-right:4px;margin-bottom:4px;width:33.1%;height:5pc} .index-top-ad a:before{position:absolute;right:0;bottom:0;width:26px;height:1pc;background:url(https://www.ysu2.com/img/watermark.png);color:#fff;content:" ";text-align:center;font-size:9pt} .index-top-ad a img{z-index:1;width:100%;height:70px!important} .index-top-ad a:nth-child(3n+0){margin:0} .index-top-ad span a,.index-top-ad span a img{display:block;overflow:hidden;width:49.8%;height:70px;margin-right: 1px !important;} .index-top-ad span a:nth-child(2),.index-top-ad span a:nth-child(2) img{margin-right:0!important} .index-top-ad span{float:inherit;margin-bottom:5px;width:100%} .index-top-ad div{float:inherit;margin-bottom:5px;width:100%} .index-top-ad div a,.index-top-ad div a img{display:block;overflow:hidden;width:100%;height:70px} .index-top-ad p{display:block;overflow:hidden;width:1180px} .index-top-ad p a{width:100%} /\*首页中间横幅广告\*/ .indexnews-ad { margin: -10px auto; background: #fff; padding: 15px 20px; width: 75pc; overflow: hidden; border-radius: 7px; box-shadow: 0 5px 10px #00000005; } .indexnewss-ad li { width: 30%; margin-right: 5%; float: left; box-sizing: content-box } .indexnewss-ad li:nth-child(3) { margin-right: 0; border-right: 0; padding-right: 0 } .indexnewss-ad li img { float: left; width: 52px; height: 52px; margin-right: 15px; border-radius: 10px } .indexnewss-ad li div { float: left; width: calc(100% - 52px - 25px - 75pt - 25px) } .indexnewss-ad li div h3 { font-size: 1pc; color: #333; height: 25px; line-height: 30px } .indexnewss-ad li div h3, .indexnewss-ad li div span { display: block; text-overflow: ellipsis; white-space: nowrap; overflow: hidden } .indexnewss-ad li div span { font-size: 13px; height: 26px; line-height: 26px; color: #a9a9a9 } .indexnewss-ad li .go { float: right; width: 75pt; border-radius: 20px; height: 35px; line-height: 33px; margin-top: 8.5px; text-align: center; margin-left: 10px; color: #ababab; border: 1px solid #ededed; transition: .2s all } .indexnewss-ad li .go:hover { border: 1px solid #1b54bc; color: #1b54bc } /\*首页矩形广告\*/ .top-ad { padding: 10px 10px 6px; display: flex; flex-wrap: wrap; margin-bottom: -15px; background: #fff; } .top-ad>a { width: calc((100% - 10px \* 5) / 6); margin-right: 10px; height: 90px; border-radius: 6px; overflow: hidden; margin-bottom: 10px; transition: 0.2s all; } .top-ad> a::after{ content:"广告"; position:absolute;right:0; bottom:0; line-height:1.28; font-size:12px; color:rgba(255,255,255,.5); background: rgb(0 0 0 / 0%); padding:2px 4px; border-radius:6px 0 0 0; transform-origin:right bottom;transform:scale(.8);} .top-ad>a:nth-child(6n) { margin-right: 0; } .top-ad>a:hover { transform: scale(1.05); } .top-ad>a>img { width: 100%; height: 100%; display: block; } \[/content\_hide\] **Tags:** ps, 商城, 广告, 微信 **Categories:** 网站源码 ---