BoxOver js 提示框 TIP提示效果免费下载
【资源属性】:资源名称:BoxOver js 提示框 TIP提示效果
资源大小:16KB
资源类别: js框架 》 其它框架
更新时间:2023-03-05
资源语言:简体中文
授权方式:免费下载
使用平台:Windows/Linux/Mac
下载地址:下载地址
资源介绍:
图片TIP提示效果boxover
BoxOver is configured through the "title" attribute of HTML elements.
To make a tooltip appear over the "div" above we alter the code as follows:
This "div" now looks like this:
Settings The "installation" section details the most simple way to initialise BoxOver.
There are many tweaks which can be set to customise it to your needs.
As shown above BoxOver is set through a tag's "title" attribute.
The general format is given by
The following table lists settings for BoxOver.
Step 1
Include the folllowing somewhere in the HTML of your page
<SCRIPT SRC="BoxOver.js"></SCRIPT>
NB: Make sure "src" points to the correct location of the boxOver.js file
Step 2
Next, go to the code for the HTML element you would like the tooltip to appear over.
For instance, imagine we had the following "div" in our HTML document.
<DIV style="BORDER: #558844 1px solid;WIDTH:200px;HEIGHT: 75px">
My div with some text inside
</DIV>
My div with some text inside
</DIV>
This "div" looks as follows:
My div with some text inside
BoxOver is configured through the "title" attribute of HTML elements.
To make a tooltip appear over the "div" above we alter the code as follows:
<DIV TITLE="header=[header text] body=[body text]" STYLE="BORDER: #558844 1px solid;WIDTH:200px;HEIGHT: 75px">
My div with some text inside. Move over me to see my tooltip.
</DIV>
My div with some text inside. Move over me to see my tooltip.
</DIV>
This "div" now looks like this:
My div with some text inside. Move over me to see my tooltip.
Settings The "installation" section details the most simple way to initialise BoxOver.
There are many tweaks which can be set to customise it to your needs.
As shown above BoxOver is set through a tag's "title" attribute.
The general format is given by
title="parameter1=[value1] parameter2=[value2] parameter3=[value3]......"
The following table lists settings for BoxOver.
| Parameter | Possible values | Default | Description |
| header | Any character | blank | Specifies the header text of the tooltip |
| body | Any character | blank | Specifies the body text of the tooltip |
| fixedrelx | Any integer | N/A | Forces the X-coordinate of the tooltip to stay fixed (offset is relative to the annotated HTML element) |
| fixedrely | Any integer | N/A | Forces the Y-coordinate of the tooltip to stay fixed (offset is relative to the annotated HTML element) |
| fixedabsx | Any integer | N/A | Forces the X-coordinate of the tooltip to stay fixed (X is an offset relative to the body of the HTML document) |
| fixedabsy | Any integer | N/A | Forces the Y-coordinate of the tooltip to stay fixed (Y is an offset relative to the body of the HTML document) |
| windowlock | on / off | on | Make tooltip stick to side of the window if user moves close to the side of the screen. |
| cssbody | Any defined style class | Built in styles | Specifies CSS class for styles to be used on tooltip body. |
| cssheader | Any defined style class | Built in styles | Specifies CSS class for styles to be used on tooltip header. |
| offsetx | Any integer | 10 | Horizontal offset, in pixels, of the tooltip relative to the mouse cursor. |
| offsety | Any integer | 10 | Vertical offset, in pixels, of the tooltip relative to the mouse cursor. |
| doubleclickstop | on / off | on | Specifies whether to halt the tooltip when the user double clicks on the HTML element with the tooltip. |
| singleclickstop | on / off | off | Specifies whether to halt the tooltip when the user single clicks on the HTML element with the tooltip. - if both singleclickstop and doubleclickstop are set to "on", singleslclickstop takes preference. |
| requireclick | on / off | off | Specifies whether the user must first click the element before a tooltip appears. Intended for use on links so that information appears while the link is followed. |
| hideselects | on / off | off | Specifies whether to hide all SELECT boxes on page when popup is activated. |
| fade | on / off | off | Specifies whether to fade tooltip into visibility. |
| fadespeed | Number between 0 and 1 | 0.04 | Specifies how fast to fade in tooltip. |
| delay | Any integer | 0 | Specifies delay in milliseconds before tooltip displays. |
资源标签: BoxOver