overlib实例与用法介绍

overLIB 是一个生成提示框与弹出菜单等页面效果的一段非常优秀的JS代码。
它可以简单的通过设置一些参数或命令来改变弹出页面的款式、皮肤与形状,不但如此,它还提供了非常简单的扩展功能,来足客户的不同需求。

overLIB 使用非常的简单。
一、在<head></head> 标签内添加: <script type="text/javascript" src="overlib.js"><!-- overLIB (c) Erik Bosrup --></script>

二、在<body></body>标签内添加:<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div> 4.10以上的版本可省略此步
三、生成两种不同款式(popup与sticky)的弹出页面
<a href="javascript:void(0);" οnmοuseοver="return overlib('这是一个popup.');" οnmοuseοut="return nd();">popup示例</a>
<a href="javascript:void(0);" οnmοuseοver="return overlib('这是一个sticky',STICKY, MOUSEOFF);" οnmοuseοut="return nd();">stick示例 </a>
四、 命令与参数

popup

Attribute Name Type Required Default Description
text string Yes n/a the text/html to display in the popup window
trigger string No onMouseOver What is used to trigger the popup window. Can be one of onMouseOver or onClick
sticky boolean No false Makes the popup stick around until closed
caption string No n/a sets the caption to title
fgcolor string No n/a color of the inside of the popup box
bgcolor string No n/a color of the border of the popup box
textcolor string No n/a sets the color of the text inside the box
capcolor string No n/a sets color of the box's caption
closecolor string No n/a sets the color of the close text
textfont string No n/a sets the font to be used by the main text
captionfont string No n/a sets the font of the caption
closefont string No n/a sets the font for the "Close" text
textsize string No n/a sets the size of the main text's font
captionsize
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值