本文介绍了jQuery UI工具提示小部件的最大宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用jQuery UI的新工具提示,并且在弄清楚如何设置最大宽度时遇到麻烦工具提示.我猜应该用 position 完成,但是怎么做?
I use jQuery UI's new Tooltip and having trouble with figuring out how to set a maximum width of the tooltip. I guess it should be done with position, but how?
推荐答案
基于 Senni的回复,我在一个单独的CSS文件:
Based on Senni's reply, I added following to a separate CSS-file:
div.ui-tooltip {
max-width: 400px;
}
一个旁注:请确保您单独的CSS在ui-css之后 之后,否则将无效.否则,您也可以使用!important
-标记.
A sidenote: Make sure your separate CSS follows after the ui-css, otherwise there will be no effect. Otherwise you also could use the !important
- marker.
这篇关于jQuery UI工具提示小部件的最大宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!