You cannot hover over a hidden element. One solution is to nest the element inside another container:
CSS:
.spoiler span {
visibility: hidden;
}
.spoiler:hover span {
visibility: visible;
}
HTML:
Spoiler: <span class="spoiler"><span>E.T. phones home.</span></span>
Demo:
http://jsfiddle.net/DBXuv/
Update
On Chrome, the following can be added:
.spoiler {
outline: 1px solid transparent;
}
Updated demo: http://jsfiddle.net/DBXuv/148/
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…