简体   繁体   中英

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! 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:

</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?

EDIT:

Put also this on the css:

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

IF you are looking for full screen within browser use width:100%; height: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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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