Commit cff27824 by lmf

优化轮播图样式

parent c2cdfcd7
......@@ -5,10 +5,7 @@
*/
?>
<style>
.banner1{
background: url(/media/carousel/pc/1.jpg) no-repeat center;
}
.banner1,.banner1 >.imgbox, .banner1 >.imgbox > a, .banner1 >.imgbox > a >img{
.banner1,.banner1 >.imgbox, .banner1 >.imgbox > a, .banner1 >.imgbox > a >img,.top_banner {
height: 634px !important;
}
input#left,input#right {
......@@ -16,12 +13,8 @@
padding-top: 2px;
}
@media (max-width: 768px) {
.banner1{
background: url(/media/carousel/mobile/1.jpg) no-repeat center;
}
.banner1, .banner1 > .imgbox, .banner1 > .imgbox > a, .banner1 > .imgbox > a > img {
.banner1, .banner1 > .imgbox, .banner1 > .imgbox > a, .banner1 > .imgbox > a > img,.top_banner {
height: 577px !important;
margin-top: 6.5 %;
}
input#left, input#right {
......@@ -69,7 +62,7 @@
str += `<a href="${this.href[i]}"><picture>
<source media="(max-width: 768px)" srcset="${this.img[i][1]}" />
<source media="(min-width: 769px)" srcset="${this.img[i][0]}" />
<img src="${this.img[i][0]}" loading="lazy" /></picture></a>`
<img src="${this.img[i][0]}" loading="lazy" class="top_banner" /></picture></a>`
}
that.html(`<div class="imgbox">${str}</div>`).css({
"width":"100%",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment