-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmouse-follow.html
39 lines (35 loc) · 1.46 KB
/
mouse-follow.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>元素跟随鼠标移动 - DynamicCss Demo</title>
<meta http-equiv="X-UA-Compatible" content="IE=11,chrome=1" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="jquery.js"></script>
<script src="avalon.shim.js"></script>
<script src="rhythm.avalon.dynamicstyle.js"></script>
<script src="rhythm.avalon.dynamicstyle.helper.js"></script>
</head>
<body>
<fieldset>
<legend>外部样式</legend>
<script type="text/dynamicstyle" ms-controller="dynamicStyle" ms-dynamicstyle-url="mouse-follow.txt">
</script>
<div class="out-dynamic-class-mouse-follow">为什么追我 3</div>
</fieldset>
<fieldset>
<legend>内联样式</legend>
<script type="text/dynamicstyle" ms-controller="dynamicStyle" ms-dynamicstyle>
.inline-dynamic-class-mouse-follow {
position: absolute;
top:{{layout.mouse.pageY}}px;
left:{{layout.mouse.pageX}}px;
}
</script>
<div class="inline-dynamic-class-mouse-follow">为什么追我 1</div>
</fieldset>
<fieldset>
<legend>行内样式</legend>
<div class="div1" ms-controller="dynamicStyle" ms-dynamicstyle-style="position: absolute;top:{{layout.mouse.pageY}}px;left:{{layout.mouse.pageX}}px;">为什么追我 2</div>
</fieldset>
</body>
</html>