使 Jquery Cycle 在动态 xhtml 布局中工作
您好,我正在尝试使用 粒子树方法 < /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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据您的目标浏览器,您也许可以对媒体查询(响应式设计)执行相同的操作。通过在 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.