所以我正在尝试将我的幻灯片放映为全屏,就像 www.dealix.com 上的那样(您可以引用)我目前使用的是 Jquery 是必须执行的 css 代码还是必须执行图像大小适合屏幕,如果是的话,互联网浏览器的默认宽度是多少,非常感谢!请对我放轻松,因为我只是在编码的第二个月!
CSS:
<!--
#fadein {
position:relative;
height:320px;
width:320px;
}
#fadein img {
position:absolute;
left:0;
top:0;
}
-->
HTML/Javascript:
</div>
<script src="jquery-1.11.1.min.js"></script>
<script type="text/javascript">
$(function() {
$('.fadein img:gt(0)').hide();
setInterval(function () {
$('.fadein :first-child').fadeOut()
.next('img')
.fadeIn()
.end()
.appendTo('.fadein');
}, 4000); // 4 seconds
});
最佳答案
如果您正在浏览器中寻找全屏,请使用 width:100%;高度:100%;
或者如果你正在寻找全屏,请引用这个问题
How to make the window full screen with Javascript (stretching all over the screen)
关于javascript - 如何在网页上全屏显示幻灯片?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24761425/