From 4cee7a57fb60c30b44d9686ba1505b57bfecce78 Mon Sep 17 00:00:00 2001
From: kjodle
Date: Mon, 5 Jun 2017 20:01:36 -0400
Subject: [PATCH] Added spoiler trick
---
css/spoiler.css | 10 ++++++++
css/styles.css | 29 ++++++++++++-----------
index.htm | 19 +++------------
spoiler.htm | 63 +++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 91 insertions(+), 30 deletions(-)
create mode 100644 css/spoiler.css
create mode 100644 spoiler.htm
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 @@
CSS Tricks
These are just tricks and techniques I've used in various places. I believe that most of them are CSS3 compliant.
-Spoiler
-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.
+
+ - Spoiler — Hide text from visitors until they hover over it.
+
+
+
+
+
Spoiler
+
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 is the HTML:
+
+
+<p>Who did it? <span class="spoiler">The butler did it.</span></p>
+
+
+
Example
+
+
And here's how it works in real life:
+
Who did it? The butler did it.
+
+
Back to Index
+
+
+
diff --git a/spoiler.htm b/spoiler.htm
new file mode 100644
index 0000000..6218f07
--- /dev/null
+++ b/spoiler.htm
@@ -0,0 +1,63 @@
+
+
+