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