我有这个代码,它工作正常,但我希望能够使它当图像出现文本层disapears,并且会有一个链接将xt返回并删除图像。我该如何做这件事......,改变可行性和覆盖率有什么关系?删除文本图层并用图像替换
<html>
<script type="text/javascript"><!--
function sbox(boxName,xname) {
theBox = document.getElementById(boxName);
theBox.className = xname;
}
//-->
</script>
<style>
#main
{
position: absolute;
width: 800px;
height: 600px;
}
.test1
{
position: absolute;
top: 20px;
width:80px;
height: 80px;
border-style: solid;
border-color: green;
}
.test2
{
position: absolute;
top: 120px;
width:80px;
height: 80px;
border-style: solid;
border-color: red;
}
.test3
{
position: absolute;
top: 220px;
width: 80px;
height: 80px;
border-style: solid;
border-color: blue;
}
.test4
{
position: absolute;
top: 320px;
width: 80px;
height: 80px;
border-style: solid;
border-color: black;
}
.test5
{
position: absolute;
top: 20px;
width:80px;
height: 80px;
border-style: solid;
border-color: yellow;
}
#test6
{
width: 80px;
height: 80px;
border-style: solid;
border-color: green;
}
#test7
{
width: 80px;
height: 80px;
border-style: solid;
border-color: green;
}
</style>
<div class='test1' id="test1"><a href="#" onclick="sbox('test1', 'test5'); return false;">test1</a></div>
<div class='test2' id="test2">test2</div>
<div class='test3' id="test3">test3</div>
<div class='test4' id="test4">test4</div>
</html>
我试过了,无法启动它。我会在哪里放置文本,并且需要样式表?基本上我不确定如何适应我现有的网页来起诉这种格式? – 2008-11-28 12:43:17