atlas_hover
SRC:
1<%@ Page Language="C#" %>
2
3<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
5<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6<head id="Head1" runat="server">
7 <title>ASP.NET "Atlas" Demo: Sys.Control Behaviors</title>
8 <link href="intro.css" type="text/css" rel="Stylesheet" />
9</head>
10
11<body>
12 <form id="form1" runat="server">
13 <div>
14 <atlas:ScriptManager runat="server" ID="ScriptManager1" />
15 <div id="Div1" class="title">
16 <h2>ASP.NET "Atlas" Demo: Sys.Control: Behaviors</h2>
17 The following example shows use of more complex behaviors.
18 </div>
19 <div class="description">
20 <hr />
21 <h3><u>Example 1: Pop-up component and hover behavior</u></h3>
22 The following example demonstrates the pop-up which will be shown when the mouse
23 is hovered over the highlighted element.
24 <p></p>
25 What is the definition of a <a id="hoverLink" class="hoverlabel">word</a>?
26 <div id="popup" style="visibility:hidden;display:none;border:solid 1px black;background-color:Yellow;">
27 A sound or a combination of sounds.
28 </div>
29 </div>
30
31 <script type="text/xml-script">
32 <page xmlns:script="http://schemas.microsoft.com/xml-script/2005">
33 <components>
34 <control id="popup">
35 <behaviors>
36 <popupBehavior id="popupBehavior" parentElement="hoverLink" positioningMode="BottomLeft"/>
37 </behaviors>
38 </control>
39
40 <hyperLink id="hoverLink">
41 <behaviors>
42 <hoverBehavior unhoverDelay="1000" hoverElement="popup">
43 <hover>
44 <invokeMethod target="popupBehavior" method="show"/>
45 </hover>
46 <unhover>
47 <invokeMethod target="popupBehavior" method="hide"/>
48 </unhover>
49 </hoverBehavior>
50 </behaviors>
51 </hyperLink>
52 </components>
53 </page>
54 </script>
55 </div>
56 </form>
57</body>
58</html>
59
2
3<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
5<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6<head id="Head1" runat="server">
7 <title>ASP.NET "Atlas" Demo: Sys.Control Behaviors</title>
8 <link href="intro.css" type="text/css" rel="Stylesheet" />
9</head>
10
11<body>
12 <form id="form1" runat="server">
13 <div>
14 <atlas:ScriptManager runat="server" ID="ScriptManager1" />
15 <div id="Div1" class="title">
16 <h2>ASP.NET "Atlas" Demo: Sys.Control: Behaviors</h2>
17 The following example shows use of more complex behaviors.
18 </div>
19 <div class="description">
20 <hr />
21 <h3><u>Example 1: Pop-up component and hover behavior</u></h3>
22 The following example demonstrates the pop-up which will be shown when the mouse
23 is hovered over the highlighted element.
24 <p></p>
25 What is the definition of a <a id="hoverLink" class="hoverlabel">word</a>?
26 <div id="popup" style="visibility:hidden;display:none;border:solid 1px black;background-color:Yellow;">
27 A sound or a combination of sounds.
28 </div>
29 </div>
30
31 <script type="text/xml-script">
32 <page xmlns:script="http://schemas.microsoft.com/xml-script/2005">
33 <components>
34 <control id="popup">
35 <behaviors>
36 <popupBehavior id="popupBehavior" parentElement="hoverLink" positioningMode="BottomLeft"/>
37 </behaviors>
38 </control>
39
40 <hyperLink id="hoverLink">
41 <behaviors>
42 <hoverBehavior unhoverDelay="1000" hoverElement="popup">
43 <hover>
44 <invokeMethod target="popupBehavior" method="show"/>
45 </hover>
46 <unhover>
47 <invokeMethod target="popupBehavior" method="hide"/>
48 </unhover>
49 </hoverBehavior>
50 </behaviors>
51 </hyperLink>
52 </components>
53 </page>
54 </script>
55 </div>
56 </form>
57</body>
58</html>
59
效果: