当前位置: 首页 > 图文教程 > 网页制作 > CSS样式表 > 网页制作实例:em实现倒三角的提示效果

CSS样式表
IE6使用浮动去掉元素中的多余空白间距
CSS教程:定位属性在元素中的层级关系
SEO入门教程:自然搜索结果PPC广告和热图
21个神奇的CSS技巧
CSS 半透明度设置归纳总结[Firefox,IE,Chrome,Safari]
CSS 很酷的透明样式
百度有啊 CSS圆角实现代码
优秀的CSS 框架整理
CSS和“★”字符制做的中国国旗实现代码
基于firebug的firefox扩展 css usage
减少图片HTTP请求的方法分析
CSS 面向对象CSS FAQ
驯服CSS选择器
DIV+CSS 浮动布局完美解决方案
CSS 网页背景渐变实现代码
CSS 网页布局中的图文列表实现代码
css IE8 兼容问题的汇总
CSS 实现网页图片的预加载
web开发中怎么样使css书写规范?
div+css样式表的id和class常用命名规则

CSS样式表 中的 网页制作实例:em实现倒三角的提示效果


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-28   浏览: 79 ::
收藏到网摘: n/a

效果如下:

uploads/200811/12_155025_223323t.jpg


鼠标放上显示第二个的效果!
代码如下:

<!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=gb2312" />
<title>em实现倒三角的提示效果-JS特效学院</title>
</head>
<style>
 <!--
 #menu {width:500px;padding:0;margin:40px auto;list-style-type:none;display:<span href="tag.php?name=tab" onclick="tagshow(event)" class="t_tag">tab</span>le;}
 #menu li {width:100px; float:left; line-height:30px}
 #menu a {position:relative;display:block; text-decoration:none; background:#cccccc;width:100px; }
 #menu a span {display:block; font-weight:bold;color:#000; border-style:solid;border-width:0px 2px 2px 0px; border-color:#fff #fff #06a #fff;text-align:center; }#menu a em {display:none;}
 #menu a:hover {background:#FF0000;}#menu a:hover span {color:#fff; }
 #menu a:hover em {display:block; overflow:hidden; border:6px solid #06a; border-color:#06a #fff; border-width:6px 6px 0 6px; position:absolute; left:50%; top:100%;margin-left:-6px;}
 -->
 </style>
<body>
 <ul id="menu">
 <li><a href="http://www.ruanchen.com/"codeTextarea"><!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=gb2312" /> <title>em实现倒三角的提示效果-JS特效学院</title> </head> <style> <!-- #menu {width:500px;padding:0;margin:40px auto;list-style-type:none;display:<span href="tag.php?name=tab" onclick="tagshow(event)" class="t_tag">tab</span>le;} #menu li {width:100px; float:left; line-height:30px} #menu a {position:relative;display:block; text-decoration:none; background:#cccccc;width:100px; } #menu a span {display:block; font-weight:bold;color:#000; border-style:solid;border-width:0px 2px 2px 0px; border-color:#fff #fff #06a #fff;text-align:center; }#menu a em {display:none;} #menu a:hover {background:#FF0000;}#menu a:hover span {color:#fff; } #menu a:hover em {display:block; overflow:hidden; border:6px solid #06a; border-color:#06a #fff; border-width:6px 6px 0 6px; position:absolute; left:50%; top:100%;margin-left:-6px;} --> </style> <body> <ul id="menu"> <li><a href="http://www.ruanchen.com/"runCode(this.offsetParent.getElementsByTagName('textarea')[0])" type="button" value="运行代码" /> [Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]