HTML:顯示工具提示,動態
<html>
<head>
<title>Tooltips</title>
<link rel="stylesheet" type="text/css" href="tooltips.css" />
</head>
<body>
<ul>
<li tabindex="1">
<span class="name">Capacity: 1.5 </span>
<div class="tooltip">
<p><strong>Some text</strong></p>
<p>Some long long long long long long long long long long long long long long long text</p>
</div>
</li>
</ul>
</body>
</html>
的CSS:
li { position : relative; }
div.tooltip {
display: none;
position: absolute;
top: 8px;
left: 120px;
width: 24em;
z-index: 1;
border: 1px solid gray;
background: #fffdc3 top left repeat-x;
}
如何使用鋰的懸停事件來設置DIV財產(不包括JS)?喜歡的東西:
li:hover -> div.tooltip { display : block; }
li:focus -> div.tooltip { display : block; }
**(不含JS)** – stecb 2011-05-23 11:19:45