我有以下页面: !DOCTYPE htmlhtml head titleThe Divine Liturgy/title meta charset='utf-8' style type='text/css' body { font-family: Verdana, Arial, sans; } .ui-tooltip, .ui-widget, .ui-corner-all, .ui-widget-content, .ui-tooltip-conte
<!DOCTYPE html> <html> <head> <title>The Divine Liturgy</title> <meta charset='utf-8'> <style type='text/css'> body { font-family: Verdana, Arial, sans; } .ui-tooltip, .ui-widget, .ui-corner-all, .ui-widget-content, .ui-tooltip-content { background-color: #ffff00; width: 800px; } </style> <link rel='stylesheet' type='text/css' href='/js/jquery-ui-1.10.2.custom/css/smoothness/jquery-ui-1.10.2.custom.css' /> </head> <body> <p title="Bless, Master!">Deacon: Blagoslavie, Vladyko!</p> <p title="Blessed is the Kingdom of the Father, and of the Son, and of the Holy Spirit: Now and ever, and unto the ages of ages.">Priest: Blagoslovenno tsarsvo Otsa i Sina, i Svatago Duha, nine e presno, i vo beki vekov.</p> <p title="Christ is risen from the dead, trampling down death by death, and on those in the tombs bestowing life!">Clergy: Hristos voskrece iz mertvih, smertyio smert poprav, i sushim vo grodex zhevot darovav!</p> <script src='/js/vendor/jquery-1.8.2-min.js'></script> <script src='/js/jquery-ui-1.10.2.custom/js/jquery-ui-1.10.2.custom.min.js'></script> <script> jQuery(document).tooltip(); </script> </body> </html>
我已经在CSS类上尝试了几种排列,它的当前行为是根据需要显示黄色背景悬停在更宽的宽度,但没有黑色和白色边框区域也被扩展 – 所以工具提示悬停在内容溢出在右边界 – 不是所希望的.
我怎样才能要求包装盒适合800px内含div?
谢谢,
在这里,您将800px宽度应用于您的内容,但是.ui-tooltip类定义为最大宽度:300px;在jqueryui css文件中.你的宽度:800px;没有效果.
您必须分离您的类并覆盖最大宽度:
body { font-family: Verdana, Arial, sans; } .ui-tooltip{ max-width: 800px; width: 800px; } .ui-tooltip-content{ background-color: #ffff00; }
不要覆盖ui-corner,ui-widget ……或其他类.您可能稍后需要它们.只需修改此处涉及的ui-tooltip;).