DIV+CSS 网页TIP的简单作法

时间:2021-05-28

基本的原理就是用display;当display:block;就显示;当display:none;时就不显示;
例如:
复制代码 代码如下:
#infoboxspan{display:none;}
#infoboxa:hoverspan{display:block;position:absolute;}

zishu test tip /* zishu.cn */ *{ margin:0; padding:0; list-style:none; font-size:12px; line-height:1.8;} body{ background: #333} #info{padding:50px;} #infobox{padding:0px 20px;background-color: #640000;} #center{background: #ABBAAC; border-top:2px solid #333; padding:20px;} .c{ clear:both; height:1px; overflow: hidden; background:#333} #infobox li{ border-right:1px solid #000; float:left; margin-right:1px; text-align:center;margin-top:-4px; } a{ width:100px;line-height:28px; display:block;} a:link,a:visited{color:#000;background:#FF9900;text-decoration: none;} a:hover,a:active{ color:#FFFF00;background:#000;} /*以是下显示TIP的内容*/ #infobox span{ display: none; } #infobox a:hover span{display: block;position:absolute;border:1px solid #640000;background: #FFFFCC;margin-top:26px!important; margin-top:20px;color:#000;padding:5px;white-space: nowrap;}

  • 从这里可以进入我的首页!网站首页
  • 这里边有一些英语和笑话!英语笑话
  • 这里都是一些朋友的网站!友情链接
  • 你要有什么要说的就来这!给我留言
  • 是自已写的和收集的文章!技术文章
  • 没有了都放在日记里面了!生活照片
[Ctrl+A 全选 注:引入外部Js需再刷新一下页面才能执行]

声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。

相关文章