jQuery 旋转和透明图像
你好,我有一些图像有锯齿状边缘,所以它们自然是 gif、png 等并且具有透明度,但是我希望其中 2 个图像在 jquery 中旋转,而一个不旋转,我有这段代码:
$('#slideshow ul:odd').css('background', 'url(../skin/frontend/default/getbranded/images/header/slideshowpic2.gif) no-repeat').rotate({angle:45});
$('#slideshow ul:even').css('background', 'url(../skin/frontend/default/getbranded/images/header/slideshowpic1.gif) no-repeat').rotate({angle:0});
我不知道为什么它不在 jquery 中工作,我使用了 jqueryrotate 插件,并且也在 css3 中尝试过,尽管在 css3 中它可以工作,但图像周围有白色锯齿状笔划,我该如何解决这个问题?
这些是背景图像。 http://www.getbranded.co/magento/index.php/ 这是我使用的插件:http://code.google.com/p/jqueryrotate/
graham
Hi I have some images which have a jagged edge so they naturally are a gif, png etc and have transparency however i want 2 of these images to rotate in jquery and one not to, i have this code:
$('#slideshow ul:odd').css('background', 'url(../skin/frontend/default/getbranded/images/header/slideshowpic2.gif) no-repeat').rotate({angle:45});
$('#slideshow ul:even').css('background', 'url(../skin/frontend/default/getbranded/images/header/slideshowpic1.gif) no-repeat').rotate({angle:0});
i don't know why its not working in jquery, i used jqueryrotate plugin and have also tried in css3 although in css3 it works it has a white jagged stroke around the image, how can i fix this?
These are background images. http://www.getbranded.co/magento/index.php/ this is the plugin i used: http://code.google.com/p/jqueryrotate/
graham
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
嗯,我是 jQueryRotate 插件的作者,正如我在问题页面上所说的 - 该插件不支持旋转 UL 元素。它主要是为了旋转图像而创建的(以支持多种浏览器)。对你来说,它在 Chrome 上工作只是因为在 chrome 中我使用 css3 也可以旋转任何内容,但如果你在 IE<9 或 Firefox 中尝试相同的东西,那么你会发现这不起作用。我计划很快发布新版本的插件,这可能会通过旋转整个内容来放弃某些浏览器的支持,但为此我需要一些时间来实现/测试。请直接在项目主页上告诉我您的问题 - 我会尽力帮助您解决这些问题。
Ehm I'm an author of jQueryRotate plugin and as I said you on issues page - rotating UL elements is not supported by this plugin. Its mainly created to rotate images only (to support wide range of browsers). For you it works on Chrome just because in chrome I using css3 that also can rotate any content, but if you try the same stuff in IE<9 or Firefox then you will see that this doesn't work. I planning to release new version of plugin soon that might drop some browsers support by a gain of rotating whole content, but for that I need some time for implementations/tests. Please let me know directly on a project homepage about your issues - I will try to help figure them out for you.