gpt4 book ai didi

html - 制作背景幻灯片不是全屏?

转载 作者:行者123 更新时间:2023-11-28 11:11:32 25 4
gpt4 key购买 nike

所以我得到了这个Fullscreen Background Image Slideshow来自 tympanus :) 你绝对可以在上面链接的网站上看到代码......现在我不希望它占据整个页面......我想在所有地方添加边距......我一直在努力做但无济于事。我尝试将背景图像的大小减小到较小的百分比,但它仍然不成比例......

如何为幻灯片添加等边距? :(

.cb-slideshow li span {
width: 100%;
height: 100%;
position: absolute;
top: 0px;
left: 0px;
color: transparent;
background-size: cover;
background-position: 50% 50%;
background-repeat: none;
opacity: 0;
z-index: 0;
animation: imageAnimation 36s linear infinite 0s;
}

最佳答案

我认为最简单的方法就是这样做:

.cb-slideshow li span {
left: 5%; // alter as you like
top: 5%; // alter as you like
width: 90%; // alter as you like
height: 90%; // alter as you like
position: absolute;
color: transparent;
background-size: cover;
background-position: 50% 50%;
background-repeat: none;
opacity: 0;
z-index: 0;
animation: imageAnimation 36s linear infinite 0s;
}

关于html - 制作背景幻灯片不是全屏?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21956759/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com