Jquery CSS maxHeight不工作 [英] Jquery CSS maxHeight not Working
本文介绍了Jquery CSS maxHeight不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
我有一个代码,可以改变div和图像的最大高度,
代码是:$ j(。expanded-img)。css({max-width:100%,max-height:100%});
当我试用它时chrome,它的工作原理很好,当我在firefox上试用它时它无法工作。
该代码必须做什么?
谢谢。
解决方案
j(.extended-img)。css({max-width:100% ,max-height:100%});
当我尝试使用chrome时,它的工作正常,当我在firefox上尝试它时它将无法工作。
该代码必须做什么?
谢谢。
。css({ max-width:100%,< span class =code-string> max-height:100%});
或
。css({ max-width:100%});
.css({ max-height:100%});
hello,
i've a code, that change the maxheight of an div and image,
the code is : $j(".enlarged-img").css({ "max-width": "100%", "max-height": "100%" });
when i try it to chrome, it's works and fine, when i tried it at firefox it won't work.
what must i do with that code ?
thanks.
解决方案
j(".enlarged-img").css({ "max-width": "100%", "max-height": "100%" });
when i try it to chrome, it's works and fine, when i tried it at firefox it won't work.
what must i do with that code ?
thanks.
.css({ "max-width": 100%, "max-height": 100% });
OR
.css({ "max-width": 100% }); .css({ "max-height": 100% });
这篇关于Jquery CSS maxHeight不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文