这是微软网站的,效果在 快速链接
http://www.microsoft.com/library/toolbar/3.0/sitemap/zh-cn.mspx
他的效果很好以下是我照着AjaxControlToolkit做的
但鼠标快整Over Out 的时候DIV就会让整个网站很乱而微软的再快也不会出乱
大家看看怎么办谢谢
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Animation_Test" %><%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Animation示例</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" /> <script type="text/javascript" language="javascript">
// Move an element directly on top of another element (and optionally
// make it the same size)
function Cover(bottom, top, ignoreSize) {
var location = Sys.UI.DomElement.getLocation(bottom);
//var location = $get(bottom);
top.style.position = 'absolute';
top.style.top = location.y + 'px';
top.style.left = location.x + 'px';
if (!ignoreSize) {
top.style.height = bottom.offsetHeight + 'px';
top.style.width = bottom.offsetWidth + 'px';
}
}
</script> <div align="center">
<asp:Button ID="btnInfo" runat="server" Text="看我炫不炫" /></div>
<div id="flyout" style="display: none; border-right: #99ccff 1px solid; border-top: #99ccff 1px solid;
border-left: #99ccff 1px solid; border-bottom: #99ccff 1px solid">
</div>
<div id="info" style="display: none; border-right: #99ccff 1px solid; border-top: #99ccff 1px solid;
border-left: #99ccff 1px solid; border-bottom: #99ccff 1px solid">
Once you get the general idea of the animation's up, you'll want to play a bit.
All of the animations are created from simple, reusable building blocks that you
can compose together. Before long you'll be creating dazzling visuals. By grouping
steps together and specifying them to be run either in sequence or in parallel,
you'll achieve almost anything you can imagine, without writing a single line of
code!
</div>
<cc1:AnimationExtender ID="openAnimation" runat="server" TargetControlID="btnInfo">
<Animations>
<OnMouseOver>
<Sequence>
<EnableAction Enabled = "true" />
<ScriptAction Script = "Cover($get('btnInfo'),$get('flyout'))" />
<StyleAction AnimationTarget="flyout" Attribute="display" Value="block" />
<Parallel AnimationTarget="flyout" Duration =".3" Fps="25">
<Move Horizontal ="150" Vertical="50" />
<Resize Width="200" Height="300" />
<Color PropertyKey = "backgroundColor" StartValue="#AAAAAA" EndValue = "#FFFFFF" />
</Parallel>
<ScriptAction Script = "Cover($get('flyout'),$get('info'))" />
<StyleAction AnimationTarget="info" Attribute="display" Value="block" />
<FadeIn AnimationTarget="info" Duration=".2"/>
<StyleAction AnimationTarget="flyout" Attribute="display" Value="none"/>
</Sequence>
</OnMouseOver>
</Animations>
</cc1:AnimationExtender>
<cc1:AnimationExtender ID="closeAnimation" runat="server" TargetControlID="btnInfo">
<Animations>
<OnMouseOut>
<Sequence>
<StyleAction AnimationTarget="info" Attribute="display" Value="none" />
<StyleAction AnimationTarget="flyout" Attribute="display" Value="block" />
<Parallel AnimationTarget="flyout" Duration =".3" Fps="25">
<Move Horizontal ="-150" Vertical="-50" />
<Resize Width="0" Height="0" />
<Color PropertyKey = "backgroundColor" StartValue="#EEEEEE" EndValue = "#FFFFFF" />
</Parallel>
<StyleAction AnimationTarget="flyout" Attribute="display" Value="none" />
</Sequence>
</OnMouseOut>
</Animations>
</cc1:AnimationExtender>
</form>
</body>
</html>
http://www.microsoft.com/library/toolbar/3.0/sitemap/zh-cn.mspx
他的效果很好以下是我照着AjaxControlToolkit做的
但鼠标快整Over Out 的时候DIV就会让整个网站很乱而微软的再快也不会出乱
大家看看怎么办谢谢
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Animation_Test" %><%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Animation示例</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" /> <script type="text/javascript" language="javascript">
// Move an element directly on top of another element (and optionally
// make it the same size)
function Cover(bottom, top, ignoreSize) {
var location = Sys.UI.DomElement.getLocation(bottom);
//var location = $get(bottom);
top.style.position = 'absolute';
top.style.top = location.y + 'px';
top.style.left = location.x + 'px';
if (!ignoreSize) {
top.style.height = bottom.offsetHeight + 'px';
top.style.width = bottom.offsetWidth + 'px';
}
}
</script> <div align="center">
<asp:Button ID="btnInfo" runat="server" Text="看我炫不炫" /></div>
<div id="flyout" style="display: none; border-right: #99ccff 1px solid; border-top: #99ccff 1px solid;
border-left: #99ccff 1px solid; border-bottom: #99ccff 1px solid">
</div>
<div id="info" style="display: none; border-right: #99ccff 1px solid; border-top: #99ccff 1px solid;
border-left: #99ccff 1px solid; border-bottom: #99ccff 1px solid">
Once you get the general idea of the animation's up, you'll want to play a bit.
All of the animations are created from simple, reusable building blocks that you
can compose together. Before long you'll be creating dazzling visuals. By grouping
steps together and specifying them to be run either in sequence or in parallel,
you'll achieve almost anything you can imagine, without writing a single line of
code!
</div>
<cc1:AnimationExtender ID="openAnimation" runat="server" TargetControlID="btnInfo">
<Animations>
<OnMouseOver>
<Sequence>
<EnableAction Enabled = "true" />
<ScriptAction Script = "Cover($get('btnInfo'),$get('flyout'))" />
<StyleAction AnimationTarget="flyout" Attribute="display" Value="block" />
<Parallel AnimationTarget="flyout" Duration =".3" Fps="25">
<Move Horizontal ="150" Vertical="50" />
<Resize Width="200" Height="300" />
<Color PropertyKey = "backgroundColor" StartValue="#AAAAAA" EndValue = "#FFFFFF" />
</Parallel>
<ScriptAction Script = "Cover($get('flyout'),$get('info'))" />
<StyleAction AnimationTarget="info" Attribute="display" Value="block" />
<FadeIn AnimationTarget="info" Duration=".2"/>
<StyleAction AnimationTarget="flyout" Attribute="display" Value="none"/>
</Sequence>
</OnMouseOver>
</Animations>
</cc1:AnimationExtender>
<cc1:AnimationExtender ID="closeAnimation" runat="server" TargetControlID="btnInfo">
<Animations>
<OnMouseOut>
<Sequence>
<StyleAction AnimationTarget="info" Attribute="display" Value="none" />
<StyleAction AnimationTarget="flyout" Attribute="display" Value="block" />
<Parallel AnimationTarget="flyout" Duration =".3" Fps="25">
<Move Horizontal ="-150" Vertical="-50" />
<Resize Width="0" Height="0" />
<Color PropertyKey = "backgroundColor" StartValue="#EEEEEE" EndValue = "#FFFFFF" />
</Parallel>
<StyleAction AnimationTarget="flyout" Attribute="display" Value="none" />
</Sequence>
</OnMouseOut>
</Animations>
</cc1:AnimationExtender>
</form>
</body>
</html>
解决方案 »
- jquery.autocomplete怎么对齐数据
- 请教关于从网上下载ASP.NET源码问题,
- 应用程序如何调用IE浏览器
- 必须声明标量变量 "@name"。请问怎样解决?
- 请问怎样在程序代码中访问DATALIST的SelectedItemTemplate中的控件啊?
- 后台写了一个函数,用在前台,给了一个参数,函数代码报错!请高手指点,谢谢
- 求助新手問題
- 如何在页面中处理由UserControl引发的事件?
- 老问题:在今天创建asp.net程序时,出现“你的asp.net不是1.1版“
- 求一个网站的流量统计分析系统
- 在线等!如何获取当前浏览器中显示页面的源代码?
- |M| 用什么方法来实现网站记录一台电脑什么时候访问过他
是样式没设置好吧
float position z-index
我改为这样还是很乱 那个动画的DIV会乱跑
就导致他飞舞了
这里不就是让他 的 H+150 V+50吗