-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathindex.html
More file actions
108 lines (102 loc) · 2.18 KB
/
index.html
File metadata and controls
108 lines (102 loc) · 2.18 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!--
/*
* jQuery HTML SVG connect Plugin Demo
* https://github.com/a115/HTML-SVG-connect
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/MIT
*/
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HTML-SVG-connect: a jQuery plugin</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="jquery.html-svg-connect.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$("#svgContainer").HTMLSVGconnect({
stroke: "#000",
strokeWidth: 8,
orientation: "auto",
class: "my-path",
paths: [
{ start: "#red", end: "#aqua", strokeWidth: 12, offset: 20, class: "dashed-blue" },
{ start: "#purple", end: "#green", stroke: "red" }
]
});
});
</script>
<style>
#svgContainer {
z-index: -10;
position: absolute;
background-color: silver;
opacity: 0.5;
}
body {
background-color: gray;
}
div {
opacity: 0.6;
}
#outer {
margin: 0 auto;
width: 80%;
}
#teal {
width: 6em;
height: 6em;
background-color: teal;
margin-left: 10%;
}
#orange {
height: 4em;
width: 35%;
padding: 2em 8em;
margin-left: 15em;
margin-top: 6em;
background-color: orange;
}
#red {
width: 6em;
height: 4em;
margin-left: 40%;
padding: 4em 3em;
background-color: red;
}
#aqua {
width: 5em;
height: 5em;
margin-left: 10%;
background-color: aqua;
}
#purple {
width: 9em;
height: 5em;
background-color: purple;
}
#green {
width: 5em;
height: 7em;
margin-top: 2em;
margin-left: 50%;
background-color: green;
}
.dashed-blue {
stroke-dasharray: 10px;
stroke: blue;
}
</style>
</head>
<body>
<div id="svgContainer"></div>
<div id="outer">
<div id="aqua" style="margin-bottom: 150px"></div>
<div id="red"></div>
<div id="green" style="margin-bottom: 100px; margin-left: 200px;"></div>
<div id="purple"></div>
</div>
</body>
</html>