diff --git a/css/spoiler.css b/css/spoiler.css new file mode 100644 index 0000000..ee7a48d --- /dev/null +++ b/css/spoiler.css @@ -0,0 +1,10 @@ +/* Spoiler */ + +.spoiler { + color: #fff; + border: dotted 1px #f00; + } +.spoiler:hover { + color: #000; + border: dotted 1px #bbb; + } diff --git a/css/styles.css b/css/styles.css index 3ef3a90..d3fc35f 100644 --- a/css/styles.css +++ b/css/styles.css @@ -1,5 +1,16 @@ /* Page Styles */ +* {box-sizing: content-box;} +code { + padding: 0; + margin: 0; +} +pre { + padding: 0; + margin: 0; +} + + #container { width: 80%; max-width: 800px; @@ -9,17 +20,7 @@ box-shadow: 0 0 10px #bbb; } -/* Tricks and Techniques */ -/*************************/ - -/* Spoiler */ - -.spoiler { - color: #fff; - border: dotted 1px #f00; - } -.spoiler:hover { - color: #000; - border: dotted 1px #bbb; - } - +pre { + background: #eee; + padding: 1em; +} \ No newline at end of file diff --git a/index.htm b/index.htm index 2d40a16..9c38b6f 100644 --- a/index.htm +++ b/index.htm @@ -30,22 +30,9 @@
These are just tricks and techniques I've used in various places. I believe that most of them are CSS3 compliant.
-Here is a way to hide text from visitors until they hover over it.
-Here is the CSS:
-
-.spoiler {
- color: #fff;
- border: dotted 1px #f00;
- }
-.spoiler:hover {
- color: #000;
- border: dotted 1px #bbb;
- }
-
-
-And here's how it works in real life:
-Who did it? The butler did it.
+Here is a way to hide text from visitors until they hover over it.
+ +
+.spoiler {
+ color: #fff;
+ border: dotted 1px #f00;
+ }
+.spoiler:hover {
+ color: #000;
+ border: dotted 1px #bbb;
+ }
+
+
+
+<p>Who did it? <span class="spoiler">The butler did it.</span></p>
+
+
+And here's how it works in real life:
+Who did it? The butler did it.
+ + + +diff --git a/spoiler.htm b/spoiler.htm new file mode 100644 index 0000000..6218f07 --- /dev/null +++ b/spoiler.htm @@ -0,0 +1,63 @@ + + +
+ +
+ + + + + + + + + + + + + + + +
+ +