如果我调整窗口大小,然后刷新滑块和图片,它们会自动调整以匹配浏览器的宽度。但是我需要在窗口大小调整时自动完成此操作....如何实现?可以怎么做?
http://subzerostudio.com/Clients/perkinreveller/test.html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.cycle.all.latest.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('.slideshow').cycle({
timeout: 400,
fx: 'scrollHorz',
next: '#next',
prev: '#prev',
});
});
</script>
</head>
<body>
<style>
body {
margin:0; padding:0;
height:100%;
width:100%;
position:absolute;
}
#slideshow-wrapper {
width:100%;
min-width:600px;
}
.slideshow {
width:100%;
}
.slideshow div,
.slideshow div img {
width:100% !important;
min-width:100%;
height:auto;
}
</style>
<div class="slideshow">
<div>
<img src="images/img1.jpg" alt="" />
</div>
<div>
<img src="images/img1.jpg" alt="" />
</div>
<div>
<img src="images/img1.jpg" alt="" />
</div>
</div>
</body>
</html>