Part 1 describes a tooltip widget for Web pages that has more elaborate behavior than the built-in implementation provided by popular Web browsers.
第1部分描述web页面的一个工具提示部件,与流行的Web浏览器实现的内置实现相比,它具有更高级的行为。
Part 1 of this series described a tooltip widget for Web pages with more elaborate behavior than the built-in implementation provided by popular Web browsers.
本系列的第1部分描述web页面的一个工具提示部件,与流行的Web浏览器提供的内置实现相比,它具有更精致的行为。
This FadingTooltip widget fades into view after the cursor hesitates over an HTML element, and then fades from view after the tooltip has displayed for a while.
当鼠标光标停留在一个HTML元素上之后,这个FadingTooltip部件会淡入视图,工具提示显示一段时间之后就淡出视图。
Decide for yourself whether these differences are improvements, and whether they are worth the time and effort you invested in developing your own tooltip widget.
您可以自己判断这些差异是否有改进,是否值得花时间和精力来开发自己的工具提示部件。
Your widget will need to know which HTML element to hook itself into and what content to display in its tooltip, so you'll specify these as arguments to the constructor and save them in the object.
这个部件需要知道它自己要连接到哪个HTML元素,以及要在工具提示中显示什么内容,所以要作为构造方法的参数指定这些,并将它们保存在对象中。
Your widget will need to know which HTML element to hook itself into and what content to display in its tooltip, so you'll specify these as arguments to the constructor and save them in the object.
这个部件需要知道它自己要连接到哪个HTML元素,以及要在工具提示中显示什么内容,所以要作为构造方法的参数指定这些,并将它们保存在对象中。
应用推荐