简体   繁体   English

使用jquery.flashgallery显示图片库时,根据浏览器的大小调整Div标签的大小

[英]Making Div tag resize according to browser size when using jquery.flashgallery to display the image gallery

<div id="banner">
    <script type="text/javascript" src="gallery/js/jquery.js"></script>
    <script type="text/javascript" src="gallery/js/swfobject.js"></script>
    <script type="text/javascript" src="gallery/js/flashgallery.js"></script>

    <script type="text/javascript">
    jQuery.flashgallery('gallery/gallery.swf', 'gallery/config.xml',{ width:'100%',    height:'100%', allowFullScreen: 'true', background: 'transparent'});
</script>



</div>

Here i want to make banner div to resize when i resize the browser window can some body help on this Thanks.. 在这里,我想调整横幅div的大小,当我调整浏览器窗口的大小时可以对此有所帮助。

My last post was by accident, try something like this. 我的最后一个帖子是偶然的,尝试这样的事情。 I have not tried it though. 我还没有尝试过。

$(window).resize(function() {
    var divRatio = .7;
    var divHeight = $(window).height()) * divRatio;
    var divWidth = $(window).width()) * divRatio;
    $('.yourDivYouWantHere').css({
        height : divHeight;
        width : divWidth;
    });
}

Kevin 凯文

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

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