在CSS中为Chrome设置不透明度(Setting Opacity in CSS For Chrome)
我试过以下内容:
(这实际上是用于fancybox,因为叠加层不会在chrome / safari中显示:
$("#fancy_overlay").css({<br /> 'background-color': ,<br /> 'opacity': ,<br /> '-moz-opacity': ,<br /> '-khtml-opacity': ,<br /> '-webkit-opacity:' : <br /> }).show();仍然没有(铬/野生动物园)
我究竟做错了什么?
I've tried the following:
(this is actually for fancybox, as the overlay does not show in chrome/safari:
$("#fancy_overlay").css({<br /> 'background-color': ,<br /> 'opacity': ,<br /> '-moz-opacity': ,<br /> '-khtml-opacity': ,<br /> '-webkit-opacity:' : <br /> }).show();And still nothing (in chrome/safari)
What am I doing wrong?
最满意答案
opacity适用于chrome / safari / firefox。 -moz和-khtml语法仅用于支持这些浏览器的旧版本。
我之前从未遇到过-webkit-opacity样式,似乎不到任何说它存在的文档。 我会尝试彻底删除它或修复你在那里的语法错误: '-webkit-opacity:'到'-webkit-opacity' (没有尾部冒号)。
如果这不起作用,请尝试打印的值。 确保它是0.5而不是50或50% 。
opacity should work for chrome/safari/firefox. The -moz and -khtml syntaxes are only used to support the much older versi of these browsers.
I've never run across the -webkit-opacity style before and can't seem to find any documentation that says it exists. I would try removing it entirely or fixing the syntax bug you have in there: '-webkit-opacity:' to '-webkit-opacity' (without the trailing colon).
If that doesn't work try printing the value of . Make sure it's something like 0.5 and not 50 or 50%.
#感谢您对电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格的认可,转载请说明来源于"电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格
推荐阅读
留言与评论(共有 6 条评论) |
本站网友 文件切割 | 16分钟前 发表 |
我会尝试彻底删除它或修复你在那里的语法错误: '-webkit-opacity | |
本站网友 邯郸婚纱摄影 | 14分钟前 发表 |
$("#fancy_overlay").css({<br /> 'background-color' | |
本站网友 扒开 | 4分钟前 发表 |
' | |
本站网友 苦丁茶的功效 | 28分钟前 发表 |
本站网友 成都画室 | 30分钟前 发表 |
'-webkit-opacity |