Maximum Width of jQuery UI Tooltip widget

前端 未结 8 1607
梦如初夏
梦如初夏 2021-02-07 00:50

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?

8条回答
  •  悲哀的现实
    2021-02-07 00:58

    As pointed out by the jQuery UI api, the best you can do is override the classes ui-tooltip and ui-tooltip-content this way:

    .ui-tooltip
    {
        /* tooltip container box */
        max-width: your value !important;
    }
    .ui-tooltip-content
    {
        /* tooltip content */
        max-width: your value !important;
    }
    

    Hope this helps!

提交回复
热议问题