DIV+CSS 网页TIP的简单作法
2010-01-05 23:40
465 查看
代码如下:
#infobox span{ display: none; }
#infobox a:hover span{display: block;position:absolute;}
详细出处参考:/article/1272911.html
-------------------------------------------------------------------
具体参考代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>zishu test tip</title>
<style>
/* 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;}
</style>
</head>
<body>
<div id="info">
<div id="infobox">
<ul>
<li><a href="http://www.zishu.cn" target="_blank"><span>从这里可以进入我的首页!</span>网站首页</a></li>
<li><a href="http://www.zishu.cn" target="_blank"><span>这里边有一些英语和笑话!</span>英语笑话</a></li>
<li><a href="http://www.zishu.cn" target="_blank"><span>这里都是一些朋友的网站!</span>友情链接</a></li>
<li><a href="http://www.zishu.cn" target="_blank"><span>你要有什么要说的就来这!</span>给我留言</a></li>
<li><a href="http://www.zishu.cn" target="_blank"><span>是自已写的和收集的文章!</span>技术文章</a></li>
<li><a href="http://www.zishu.cn" target="_blank"><span>没有了都放在日记里面了!</span>生活照片</a></li>
</ul>
<div class="c"></div>
</div>
<div id="center">
</div>
</div>
</body>
</html>
详细出处参考:/article/1272911.html
#infobox span{ display: none; }
#infobox a:hover span{display: block;position:absolute;}
详细出处参考:/article/1272911.html
-------------------------------------------------------------------
具体参考代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>zishu test tip</title>
<style>
/* 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;}
</style>
</head>
<body>
<div id="info">
<div id="infobox">
<ul>
<li><a href="http://www.zishu.cn" target="_blank"><span>从这里可以进入我的首页!</span>网站首页</a></li>
<li><a href="http://www.zishu.cn" target="_blank"><span>这里边有一些英语和笑话!</span>英语笑话</a></li>
<li><a href="http://www.zishu.cn" target="_blank"><span>这里都是一些朋友的网站!</span>友情链接</a></li>
<li><a href="http://www.zishu.cn" target="_blank"><span>你要有什么要说的就来这!</span>给我留言</a></li>
<li><a href="http://www.zishu.cn" target="_blank"><span>是自已写的和收集的文章!</span>技术文章</a></li>
<li><a href="http://www.zishu.cn" target="_blank"><span>没有了都放在日记里面了!</span>生活照片</a></li>
</ul>
<div class="c"></div>
</div>
<div id="center">
</div>
</div>
</body>
</html>
详细出处参考:/article/1272911.html
相关文章推荐
- DIV+CSS 网页TIP的简单作法
- DIV+CSS 网页TIP的简单作法
- DIV+CSS 网页TIP的简单作法
- [网页基础]CSS+DIV布局,简单布局例子
- web学习第一课,div+css的简单网页
- CSS+DIV 设计一个简单的个人网页界面
- 大学生简单网页div+css网页纯手写代码制作html静态页面切图排版
- 新手该怎么学习DIV+CSS网页标准布局?
- CSS+DIV:实现炫酷网页样式与布局
- [28期] 第七课 DIV+CSS标准化网页部局准备工作
- div+css网页标准布局实例教程(一)
- DIV+CSS网页布局常用的书写规范
- 精通 CSS+DIV 网页样式与布局 2 Selector -- 选择符
- 160个DIV+CSS网页模板
- 精通 CSS+DIV 网页样式与布局 13
- div+css网页布局(163)
- 网页制作:10个常见DIV+CSS错误总结
- CSS实例(六):实现网页固定大小三态图形按钮简单方法
- 网页布局 CSS简单实现垂直居中
- Web开发网络课堂第三讲:DIV+CSS网页标准化布局