Popup in CSS without Javascript
Here's how to make a popup information in pure CSS, [no Javascript used].
Use
:hover so as to use different CSS when moving the cursor.
Among the modified CSS attributes, use
display:none to hide/show the popup when the cursor is over or not.
The content of the popup is just placed in a
<span> tag within the
<a> tag
<html>
<head>
<title>Test popup</title>
<style type="text/css">
<!--
a.info
{
position:relative;
z-index:24; background-color:#ddd;
color:#000;
text-decoration:none
}
a.info:hover {z-index:25; background-color:#ff0}
a.info span{display: none}
a.info:hover span
{
display:block;
position:absolute;
top:2em; left:2em; width:10em;
border:1px solid #0cf;
background-color:#555; color:#fff;
}
-->
</style>
</head>
<body>
Enter text<a class="info" href="http://xxx.com">CCM<span>Enter your description here</span></a>.
</body>
</html>