百度空间 | 百度首页 
 
查看文章
 
HoverMenu控件
2007-12-22 04:40
“隐”系列的王者。直译是浮动菜单,但是它的作用可不仅仅是用来浮出菜单,结合你的想象,它能带你走的更远。下面的例子模拟展示了它在web游戏方面的应用(没有客户端,基于B/S的网络游戏,随着网络带宽的发展和一些好的游戏创意的出现必将在未来的网络游戏市场上占有一席之地),此例子仅为抛砖,请勿较真。
先来看看属性:
1. TargetControlID - The control that the extender is targeting. When the mouse cursor is over this control, the hover menu popup will be displayed.【目标控件】
2. PopupControlID - The ID of the control to display when mouse is over the target control. In this case, it's just a simple panel with two links:【弹出的控件】
3. HoverCssClass - The CSS class to apply to the target when the hover menu popup is visible.【弹出控件后原来目标控件的样式,注意:它不会继承原来目标控件的样式,而是直接覆盖。】
4. PopupPostion - Where the popup should be positioned relative to the target control. Can be Left (Default), Right, Top, Bottom, Center.【弹出位置】
5. OffsetX/OffsetY - The number of pixels to offset the Popup from it's default position, as specified by PopupPosition. So if you want it to popup to the left of the target and have a 5px space between the popup and the target, the value should be "-5".【X/Y坐标偏移量】
6. PopDelay - The time delay from when the mouse enters the target to when the popup is shown, in milliseconds. Default is 100.【弹出/缩回的时间延迟,单位是毫秒,默认是100毫秒】
这个控件有比DropDown更自由的弹出位置可以设置,DropDown看名字就知道——只能在下方弹出.,而且还提供了X/Y坐标偏移量属性,所以你可以将这个控件在页面的任意位置上弹出。再加上提供了HoverCssClass属性,可以用来设置弹出浮动控件以后目标控件的样式。所以这个HoverMenu真的要比DropDown友好很多。推荐使用。东西比较简单,关键就是看你的想象力和设计能力。不多说,直接贴个图:

类别:web编程 | 添加到搜藏 | 分享到i贴吧 | 浏览() | 评论 (0)
 
最近读者:
 
网友评论:
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
验证码: 请点击后输入四位验证码,字母不区分大小写
      

     

©2009 Baidu