使 Jquery Cycle 在动态 xhtml 布局中工作

发布于 2024-12-13 07:30:52 字数 1059 浏览 8 评论 0原文

您好,我正在尝试使用 粒子树方法 < /a> - 每当窗口分辨率改变时,就会调用不同的 css 样式表。

在每个样式表(default.css/thin.css/wide.css/wider.css)中,我更改了循环幻灯片的尺寸和图像的尺寸。

以前的帖子建议 Cycle 存储元素宽度和身高一次。我试图解决这个问题:

$(document).ready(function() {  
$('.slideshow')  
.after('<div id="nav">')  
.cycle({  
        fx: 'fade',  
        sync: true,  
                speedIn:  500,  
        speedOut:  500,  
        timeout: 10000,  
        pager:  '#nav',  
        next:   '.slideshow'  
                cssBefore: {  
                width: imagewidth,    
                height: imageheight  
}    

    });
});

这对我不起作用...我也尝试过containerResize: false;这是分配的情况吗! CSS 样式表中的重要规则?

感谢您的帮助!完整网站代码此处

Hello I'm trying to run a javascript resize for my page using the Particle tree method
- whenever the window resolution changes a different css stylesheet is called.

In each stylesheet (default.css/thin.css/wide.css/wider.css) I have changed the dimensions of the cycle slideshow and dimensions of the images.

Previous posts suggest Cycle stores the elements width and height once. I have tried to fix the problem:

$(document).ready(function() {  
$('.slideshow')  
.after('<div id="nav">')  
.cycle({  
        fx: 'fade',  
        sync: true,  
                speedIn:  500,  
        speedOut:  500,  
        timeout: 10000,  
        pager:  '#nav',  
        next:   '.slideshow'  
                cssBefore: {  
                width: imagewidth,    
                height: imageheight  
}    

    });
});

This doesn't work for me... I have also tried containerResize: false; is this a case of assigning ! important rules into the css stylesheets?

Thanks for any help! Full website code here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

月朦胧 2024-12-20 07:30:52

根据您的目标浏览器,您也许可以对媒体查询(响应式设计)执行相同的操作。通过在 CSS 中指定尺寸,可以应用不同的样式。看
http://www.alistapart.com/articles/responsive-web-design/ 详细信息。

Depending on your target browsers, you may be able to do the same with media queries (responsive design). By specifying the dimensions in the CSS, different styles are applied. See
http://www.alistapart.com/articles/responsive-web-design/ for details.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文