diff --git a/canvas-grad.html b/canvas-grad.html index e5da14b..d812f37 100644 --- a/canvas-grad.html +++ b/canvas-grad.html @@ -1,77 +1,70 @@ +
- -
-
-
+ body.onmousemove = function (event) {
+ var width = window.innerWidth,
+ height = window.innerHeight,
+ x = event.clientX,
+ y = event.clientY,
+ rx = 600 * x / width,
+ ry = 600 * y / height;
+
+ var xc = ~~(256 * x / width);
+ var yc = ~~(256 * y / height);
+
+ grad = ctx.createRadialGradient(rx, ry, 0, rx, ry, 600);
+ grad.addColorStop(0, '#000');
+ grad.addColorStop(1, ['rgb(', xc, ', ', (255 - xc), ', ', yc, ')'].join(''));
+ // ctx.restore();
+ ctx.fillStyle = grad;
+ ctx.fillRect(0, 0, 600, 600);
+ // ctx.save();
+ };
+ }
+
+
+
+
+
\ No newline at end of file
diff --git a/css/canvas-grad.css b/css/canvas-grad.css
new file mode 100644
index 0000000..e1dd041
--- /dev/null
+++ b/css/canvas-grad.css
@@ -0,0 +1,11 @@
+body {
+ background: #000;
+ }
+
+ canvas {
+ position: absolute;
+ top: 0;
+ left: 0;
+ height: 100%;
+ width: 100%;
+ }
\ No newline at end of file
diff --git a/css/drag-orig.css b/css/drag-orig.css
new file mode 100644
index 0000000..d9bf8b6
--- /dev/null
+++ b/css/drag-orig.css
@@ -0,0 +1,44 @@
+#boxA,
+#boxB,
+#boxC {
+ float: left;
+ width: 200px;
+ height: 200px;
+ padding: 10px;
+ margin: 10px;
+}
+
+#boxA {
+ background-color: blue;
+}
+
+#boxB {
+ background-color: green;
+}
+
+#boxC {
+ background-color: yellow;
+}
+
+#drag,
+#drag2,
+#drag3 {
+ width: 50px;
+ height: 50px;
+ padding: 5px;
+ margin: 5px;
+ -moz-user-select: none;
+}
+
+#drag {
+ background-color: red;
+}
+
+#drag2 {
+ background-color: orange;
+}
+
+#drag3 {
+ background-color: purple;
+ border: 3px brown solid;
+}
\ No newline at end of file
diff --git a/css/drag2.css b/css/drag2.css
new file mode 100644
index 0000000..4326228
--- /dev/null
+++ b/css/drag2.css
@@ -0,0 +1,66 @@
+* {
+ margin: 0;
+ padding: 0;
+ }
+
+ body {
+ margin: 50px;
+ font-family: helvetica, arial;
+ }
+
+ li {
+ list-style: none;
+ /* padding: 10px;*/
+ }
+
+ li a {
+ text-decoration: none;
+ color: #000;
+ margin: 10px;
+ width: 150px;
+ border: 3px dashed #999;
+ background: #eee;
+ padding: 10px;
+ cursor: pointer;
+ -moz-user-select: none;
+ /* -webkit-user-drag: element;*/
+ -khtml-user-drag: element;
+ display: block;
+ }
+
+ *:-khtml-drag {
+ background-color: rgba(238, 238, 238, 0.5);
+ }
+
+ a:hover:after {
+ content: ' (drag me)';
+ }
+
+ li.over {
+ border-color: #333;
+ background: #ccc;
+ }
+
+ #bin {
+ background: url(/images/bin.jpg) top right no-repeat;
+ height: 250px;
+ width: 166px;
+ float: right;
+ border: 5px solid #000;
+ position: relative;
+ }
+
+ #bin.over {
+ background: url(/images/bin.jpg) top left no-repeat;
+ }
+
+ #bin p {
+ font-weight: bold;
+ text-align: center;
+ position: absolute;
+ bottom: 20px;
+ width: 166px;
+ font-size: 32px;
+ color: #fff;
+ text-shadow: #000 2px 2px 2px;
+ }
\ No newline at end of file
diff --git a/css/html5demos.css b/css/html5demos.css
index 907e64c..1384900 100644
--- a/css/html5demos.css
+++ b/css/html5demos.css
@@ -29,13 +29,11 @@ h2 {
font-style: italic;
}
-header,
-article > *,
-footer > * {
+header, article>*, footer>* {
margin: 20px;
}
-footer > * {
+footer>* {
margin: 20px;
color: #999;
}
@@ -66,6 +64,7 @@ footer > * {
content: '...quickly';
}
*/
+
[contenteditable]:hover:not(:focus) {
outline: 1px dotted #ccc;
}
@@ -134,7 +133,7 @@ li {
#ffad .definition {
font-style: italic;
- font-family: Georgia,Palatino,Palatino Linotype,Times,Times New Roman,serif;
+ font-family: Georgia, Palatino, Palatino Linotype, Times, Times New Roman, serif;
}
#ffad .url {
@@ -157,7 +156,7 @@ body.view-source {
padding: 20px;
}
-body.view-source > * {
+body.view-source>* {
display: none;
}
@@ -189,7 +188,6 @@ body.view-source #view-source {
border-top: 1px solid #DCDCDC;
}
-
#demos .demo p {
margin-top: 0;
margin-bottom: 5px;
@@ -238,12 +236,12 @@ body.view-source #view-source {
.support span.nightly {
opacity: 0.5;
- filter:alpha(opacity=50);
+ filter: alpha(opacity=50);
}
.support span.none {
opacity: 0.1;
- filter:alpha(opacity=10);
+ filter: alpha(opacity=10);
}
#demos .tags {
@@ -262,8 +260,7 @@ body.view-source #view-source {
cursor: pointer;
}
-.tags span:hover,
-.tags span.selected {
+.tags span:hover, .tags span.selected {
border: 1px solid #75784C;
background: #FF7;
color: #333521;
@@ -278,7 +275,7 @@ body.view-source #view-source {
}
#html5badge {
-/* display: none;*/
+ /* display: none;*/
margin-left: -30px;
border: 0;
}
@@ -302,24 +299,59 @@ body.view-source #view-source {
}
/** Pretty printing styles. Used with prettify.js. */
-pre { font-size: 14px; }
-.str { color: #080; }
-.kwd { color: #008; }
-.com { color: #800; }
-.typ { color: #606; }
-.lit { color: #066; }
-.pun { color: #660; }
-.pln { color: #000; }
-.tag { color: #008; }
-.atn { color: #606; }
-.atv { color: #080; }
-.dec { color: #606; }
+
+pre {
+ font-size: 14px;
+}
+
+.str {
+ color: #080;
+}
+
+.kwd {
+ color: #008;
+}
+
+.com {
+ color: #800;
+}
+
+.typ {
+ color: #606;
+}
+
+.lit {
+ color: #066;
+}
+
+.pun {
+ color: #660;
+}
+
+.pln {
+ color: #000;
+}
+
+.tag {
+ color: #008;
+}
+
+.atn {
+ color: #606;
+}
+
+.atv {
+ color: #080;
+}
+
+.dec {
+ color: #606;
+}
#forkme {
display: none;
}
-
@media all and (min-width: 768px) {
body {
margin-top: 40px;
@@ -327,6 +359,7 @@ pre { font-size: 14px; }
}
/* Carbon Ads */
+
#carbonads {
position: fixed;
display: block;
@@ -385,7 +418,7 @@ pre { font-size: 14px; }
#carbonads span {
position: relative;
}
- #carbonads > span {
+ #carbonads>span {
max-width: none;
}
.carbon-img {
@@ -404,4 +437,4 @@ pre { font-size: 14px; }
bottom: 0;
display: block;
}
-}
+}
\ No newline at end of file
diff --git a/css/postmessage-target.css b/css/postmessage-target.css
new file mode 100644
index 0000000..bf19349
--- /dev/null
+++ b/css/postmessage-target.css
@@ -0,0 +1,5 @@
+body {
+ font: normal 16px/20px Helvetica, sans-serif;
+ margin: 0;
+ padding: 20px;
+ }
\ No newline at end of file
diff --git a/css/video-canvas.css b/css/video-canvas.css
new file mode 100644
index 0000000..0dbc915
--- /dev/null
+++ b/css/video-canvas.css
@@ -0,0 +1,17 @@
+* {
+ margin: 0;
+ }
+
+ body {
+ font-family: helvetica;
+ padding: 10px;
+ }
+
+ input {
+ width: 50px;
+ }
+
+ /*video, canvas { display: block; }*/
+ p {
+ margin-top: 20px;
+ }
\ No newline at end of file
diff --git a/drag-orig.html b/drag-orig.html
index 3db8fc3..37c3a82 100644
--- a/drag-orig.html
+++ b/drag-orig.html
@@ -1,116 +1,93 @@
+
-
-