HTML下拉菜单
一个简单的下拉菜单,主要说明CSS中posistion的作用。
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>浮动窗体</title>
<mce:style type="text/css"><!--
.submenu {
background: #ff3398;
position: absolute;
display: none;
}
.siteactive {
color: red;
}
--></mce:style><style type="text/css" mce_bogus="1">.submenu {
background: #ff3398;
position: absolute;
display: none;
}
.siteactive {
color: red;
}</style>
<mce:script type="text/javascript"><!--
function show(obj){
var fs = $(obj.id+"_");
fs.style.display="block";
}
function ac(obj){
obj.className = "siteactive";
}
function iac(obj){
obj.className = "";
}
//利用Timer更好的定时
function hideNav(obj){
var emt = $(obj.id+"0_");
emt.style.display = "none";
}
function menu(){
}
function $(l){
return document.getElementById(l);
}
// --></mce:script>
</head>
<body bgcolor="silver">
<!-- cellpadding内容和边框的距离,cellspacing边框之间的距离 -->
<table cellpadding="0" cellspacing="0">
<tr>
<td id="cinfo" align="center" onmouseout="hideNav(this);">
<div onmouseover="show(this);" style="background: blue; width: 80px;" id="cinfo0">公司信息</div>
<div class="submenu" id="cinfo0_">
<a>公司动态</a><br>
<a>管理团队</a><br>
<a>合作单位</a><br>
<a>发展单位</a>
</div>
</td>
<td align="center" onmous
相关文档:
鼠标的多种样式...
<P><a href="help.htm" style="cursor:hand">手</a>
<a href="help.htm" style="cursor:text">文本</a>
<a href="help.htm" style="cursor:MOVE">四个方向的箭头</a>
<a href="help.htm" st ......
1: 遍历并输出Table中值
<table id="tb">
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
</ ......
Struts HTML标签
<html:html>标签
属性的作用:
lang: 值为true时,就根据存储在HttpSession中的Locale对象来输出网 页使用的语言。如果不存在session或session中没有Locale对象, 就以Http请求头中的Accept-language属性来设置输出语言。如果 &nbs ......
示例:此DIV为固定定位对象
要使HTML元件定位于浏览器的某个固定位置,而不随滚动条滚动,用以下CSS代码即可,跨各个主流浏览器: POSITION: fixed! important; TOP: 100px; _position: absolute; _top: 40; _left: 100。
示例见右边黄底红字块。 ......