用CSS样式实现显示隐藏层

[入库:2005年8月18日] [更新:2007年3月25日]

本文简介:选择自 ren20 的 blog

css样式实现显示隐藏层  
  作者: 严正
来自: www.oso.com.cn

此方法不用javascript,代码少、简单,显示的层自动在链接处
以下代码加入页面中,鼠标悬浮于链接“1234567890”上时,层内容“11111111”显示,鼠标离开时层恢复隐藏状态。

<a href="####" style="color:blue" onmouseover="document.all.layer1.style.visibility=''" onmouseout="document.all.layer1.style.visibility='hidden'">
1234567890</a>
<div id="layer1" style="position:absolute; width:300px; height:100px; z-index:1; background-color: #ccffff; layer-background-color: #ccffff; border: 1px none #000000; visibility: hidden">11111111</div>

本文关键:用CSS样式实现显示隐藏层
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top