div制作三角图标

制作一个小三角

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style>
#com_a{ border-top:10px solid #FFFFCC;border-left:10px solid #FF3300;border-bottom:10px solid #FFFFCC;}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<div id="com_a" style="width:50px"></div>
</body>
</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>
<title>www.zishu.cn</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
*{ margin:0; padding:0; font-size:12px; font-family:Verdana, "宋体", Arial; line-height:1.8; list-style:none;}
#nav{ margin:50px; border:1px dashed #FF3300; background:#FFFFCC; padding:50px;}
a:link,a:visited{color:#FF6600;text-decoration: none;}
a:hover,a:active{ color:#FF0000;}
#nav a span{overflow:hidden; border-top:6px solid #FFFFCC;border-left:6px solid #FFFFCC;border-bottom:6px solid #FFFFCC; height:0px; width:0px; margin:2px 2px 0 -10px; position:absolute}
#nav a:hover span{background:#CC3300;border-top:6px solid #FFFFCC;border-left:6px solid #FF3300;border-bottom:6px solid #FFFFCC;overflow:hidden; float:left;}
</style>
</head>
<body>
<div id="nav">
<h1>应用的一个实例</h1>
  <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>
  </ul>
</div>
</body>
</html>

posted @ 2007-09-30 11:15  探路者  阅读(530)  评论(0)    收藏  举报