java容器的div中的响应绝对值

时间:2013-01-15 14:15:38

标签: php css responsive-design

我已经在我的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,

    });

1 个答案:

答案 0 :(得分:0)

用不同的方法解决。改编AS3代替java工作。它适用于响应式设计,所有变量都可以正常传递。