<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>
这里我想在调整浏览器窗口大小时调整横幅div的大小 可以帮一些人帮忙吧。
答案 0 :(得分:0)
我的上一篇文章是偶然的,尝试这样的事情。我没试过。
$(window).resize(function() {
var divRatio = .7;
var divHeight = $(window).height()) * divRatio;
var divWidth = $(window).width()) * divRatio;
$('.yourDivYouWantHere').css({
height : divHeight;
width : divWidth;
});
}
凯文