我的 Java 元素正在运行,我有绝对定位的“容器”。背景图像正在响应页面,但“容器”没有缩放。有没有办法让它们与它们位于“顶部”的图像一起缩放?这是我正在使用的一些代码。
CSS
#forest2 {
width: 960px;
max-width: 100%;
margin-left: auto;
margin-right: auto;
margin-top: 20px;
}
PHP
<div class="forest2" style = "position: relative" >
<img src = "http://xxx/wordpress/wp-content/uploads/2013/01/xxx.png">
<div style = "position: absolute; top: 315px; left: 24px;" class="slideshow0" >
<a href="http://xxx/wordpress/catch-test/"><img src="http://xxx/wordpress/wp-content/themes/responsive-child/images/1.jpg"/></a>
<a href="http://xxx/wordpress/catch-test/"><img src="http://xxx/wordpress/wp-content/themes/responsive-child/images/2.jpg"/></a>
<a href="http://xxx/wordpress/catch-test/"><img src="http://xxx/wordpress/wp-content/themes/responsive-child/images/3.jpg"/></a>
<a href="http://xxx/wordpress/catch-test/"><img src="http://xxx/wordpress/wp-content/themes/responsive-child/images/4.jpg"/></a>
<a href="http://xxx/wordpress/catch-test/"><img src="http://xxx/wordpress/wp-content/themes/responsive-child/images/5.jpg"/></a>
</div>
脚本语句..如果需要但可能不需要
<script type="text/javascript">
$(document).ready(function() {
$('.slideshow0').cycle({
fx: 'fade',
random: true,
timeout: 6000,
speed: 3000,
delay: 100,
});