How to increase default hover duration of title attribute (tooltip)

后端 未结 4 1933
粉色の甜心
粉色の甜心 2021-01-11 09:26

Is there a way to increase the duration of a tool tip displayed using the title attribute of an html tag?

Currently in IE it appears to only have about a 5 second d

相关标签:
4条回答
  • 2021-01-11 09:55

    To elaborate further on phoenix' answer. Custom tooltips will allow you great flexibility in their appearance and layout. You need to get a JavaScript library (for example, jquery, or mootools) and get a plugin to show them. Then you will link the JQuery .js file, the plugin's one, and the css, finally you will add some markup to make it work.

    For example, this one: http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/ or this one: http://craigsworks.com/projects/simpletip/

    They are usually quite simple to install, the only requirement is that your site supports javascript.

    0 讨论(0)
  • 2021-01-11 10:06

    How to increase default hover duration of title attribute (tooltip)

    Dont use IE, no time limit in Firefox browser. Or use the code I done.

    I made some code in html/css only in one file, could not make it easier.

    <!DOCTYPE html><html><body><style>
    .m span{display: none;list-style: none} .m {z-index:24;position:relative;display:inline-block}
    .m:hover span{z-index:999;display:block;position:absolute;top:19px;left:1em;border:1px solid #000;background-color:#eee;color:#000;min-width:300px}
    </style>
    <div class="m"> News         <span> Links inside span works good <a target="_blank" href="http://cnn.com">Cnn.com</a></span></div>
    <div class="m"> Hover over here and Information comes up <span> To make complex things easy is not so easy to do. </span></div> 
    <br> Just som text here to give you the 3D effect <br>
    </body></html>

    0 讨论(0)
  • 2021-01-11 10:13

    Try WZ tooltip (may no longer be maintained): Click here

    0 讨论(0)
  • 2021-01-11 10:14

    I think this is operating system dependent and you should not try to override that.

    The best way will be to create a custom tooltip.

    Here are some good ones

    jQuery Tooltip Plugin Demo

    0 讨论(0)
提交回复
热议问题