我有這個代碼,它工作正常,但我希望能夠使它當圖像出現文本層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