dps
dps · ) · 2006-10-28
2004-06-16 16:20
div标签应用(一)
-
[
学习
]
除了发送按钮是用图片实现,其他部分全部为css实现。动作切换由
changeIndex
实现。
源文件:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>通知</title>
<link href="school.css" rel="stylesheet">
<script language="javascript">
<!--
function changeIndex(ab1,ab2,ab3)
{
ab1.style.zIndex='4';
ab2.style.zIndex='0';
ab3.style.zIndex='0';
ab1.style.backgroundColor='#e8e8e8';
ab2.style.backgroundColor='#cccccc';
ab3.style.backgroundColor='#cccccc';
ab1.style.top='0';
ab2.style.top='3';
ab3.style.top='3';
}
//-->
</script>
</head>
<body leftmargin="0" topmargin="0"
onLoad="javascript:changeIndex(tab1,tab2,tab3);"
>
<div id="Layer3" style="position:absolute; left:0; top:0; width:760; height:300px;
z-index:1">
<table width="760" height="400" align="center" cellspacing="1" bgcolor="#E8F3FF">
<tr>
<td height="3"><div id="Layer2" style="position:absolute; left:192px; top:21px; width:411px; height:317px; z-index:1">
<div
id="tab1"
onClick="javascript:changeIndex(this,tab2,tab3);" style="cursor:hand;position:absolute; left:4px; top:3px; width:77px; height:28px; z-index:3;background-color: #dddddd;
border-top-width: 2px;
border-right-width: 2px;
border-left-width: 2px;
border-top-style: outset;
border-right-style: inset;
border-left-style: outset;
border-top-color: ffffff;
border-right-color: bbbbbb;
border-left-color: ffffff;
background-repeat: repeat;">
<div align="center">a通知</div>
</div>
<div
id="tab2"
onClick="javascript:changeIndex(this,tab1,tab3);" style="cursor:hand;position:absolute; left:81px; top:3px; width:77px; height:28px; z-index:0;background-color: #bbbbbb;
border-top-width: 2px;
border-right-width: 2px;
border-left-width: 2px;
border-top-style: outset;
border-right-style: inset;
border-left-style: outset;
border-top-color: ffffff;
border-right-color: bbbbbb;
border-left-color: ffffff;
background-repeat: repeat;">
<div align="center">b通知</div>
</div>
<div
id="tab3"
onClick="javascript:changeIndex(this,tab2,tab1);" style="cursor:hand;position:absolute; left:158px; top:3px; width:77px; height:28px; z-index:0;background-color: #bbbbbb;
border-top-width: 2px;
border-right-width: 2px;
border-left-width: 2px;
border-top-style: outset;
border-right-style: inset;
border-left-style: outset;
border-top-color: ffffff;
border-right-color: bbbbbb;
border-left-color: ffffff;
background-repeat: repeat;">
<div align="center">c通知</div>
</div>
<div id="Layer1" style="position:absolute; left:4px; top:26px; width:399px; height:267px; z-index:1;background-color: #e8e8e8;
border-top-width: 2px;
border-right-width: 2px;
border-bottom-width: 2px;
border-left-width: 2px;
border-top-style: outset;
border-right-style: inset;
border-bottom-style: inset;
border-left-style: outset;
border-top-color: ffffff;
border-right-color: bbbbbb;
border-bottom-color: bbbbbb;
border-left-color: ffffff;
background-repeat: repeat;
">
<form name="form1" enctype="multipart/form-data" method="post" action="">
<div id="Layer1" style="position:absolute; left:6px; top:5px; width:383px; height:216px; z-index:1;
border-top-width: 2px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 2px;
border-top-style: outset;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: outset;
border-top-color: eeeeee;
border-right-color: aaaaaa;
border-bottom-color: aaaaaa;
border-left-color: eeeeee;
background-repeat: repeat;
">
<input name="tabType" type="hidden" value=""><textarea name="textarea" cols="51" rows="14" class="txt"></textarea>
</div>
</form>
</div>
</div></td>
</tr>
</table>
</div>
<div id="Layer4" style="position:absolute; left:519px; top:279px; width:47px; height:31px; z-index:6">
<div align="right"><img src="image/008.gif" width="43" height="27" style="cursor:hand;"></div>
</div>
</body>
</html>
dps
@ 16:20 |
引用 0
|
编辑
评论
3535
35
(
35
zczxczxczxcz
ASDASDASD
(
sadasdDS
wer
rewrew
(
werwerwr
页面还可以更结构化,应将所有的style写入css中。这样会更美观
gdlmo
(
发表评论
姓名:
E-mail:
地址:
原始快照:web.archive.org