jQuery   发布时间:2022-04-19  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了我怎样才能优雅地扩展jQuery UI工具提示?大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我有以下页面

<!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,sans;
            }
        .ui-tooltip{
            max-width: 800px;
            width: 800px;
            }
        .ui-tooltip-content{
            BACkground-color: #ffff00;
            }

不要覆盖ui-corner,ui-widget ……或其他类.您可能稍后需要它们.只需修改此处涉及的ui-tooltip;).

大佬总结

以上是大佬教程为你收集整理的我怎样才能优雅地扩展jQuery UI工具提示?全部内容,希望文章能够帮你解决我怎样才能优雅地扩展jQuery UI工具提示?所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。