简体   繁体   English

如何使我的幻灯片在全屏上显示?

[英]how do I make my slide show full screen on my webpage?

So im trying to stretch my slideshow to be fullscreen like the one on www.dealix.com (something you can refer to) Im currently using Jquery is it a css code that has to be implemented or do the images have to be sized to fit the screen and if so what is the default width of an internet browser thanks so much! 因此,我试图将幻灯片放宽到全屏(如www.dealix.com上的幻灯片)(您可以参考)。我目前正在使用Jquery,它是必须实现的CSS代码还是必须调整图像大小以适合屏幕,如果可以的话,Internet浏览器的默认宽度是多少,非常感谢! please be easy on me as im only in my second month of coding! 请仅在我编写代码的第二个月对我方便一些!

CSS:


<!--
#fadein {
    position:relative;
    height:320px;
    width:320px;
}

#fadein img {
    position:absolute;
    left:0;
    top:0;
}
-->

Html/Javascript: 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
});

What about if you put the height and width properties with 100% value? 如果将heightwidth属性的值设置为100%怎么办?

EDIT: 编辑:

Put also this on the css: 也把这个放在css上:

    body{
        padding: 0px;
        margin: 0px;
    }

IF you are looking for full screen within browser use width:100%; 如果您正在浏览器中使用全屏显示,请使用width:100%; height:100%; 高度:100%;

or if you are looking total full screen refer to this question 或者如果您正在全屏浏览,请参考此问题

How to make the window full screen with Javascript (stretching all over the screen) 如何使用Javascript使窗口全屏显示(在整个屏幕上展开)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM