没有JS,游戏一样玩

第一天上班,着实有点不情愿,还是先来个游戏玩玩吧。

 

(本想在此插入可运行代码的,但是怎么也不行只能来张截图了,自行下载demo页面hanoi.rar)

汉诺塔!(什么东东?没听说过看这里)哈哈,是不是有点弱...

其实不然,如果告诉你这个是用Html和CSS写的,没有一点JS,你还觉得它弱吗?看看代码吧

如果看完上面的代码,您还没有晕,说明您很牛.^_^..........

代码
    <div style="position: absolute; margin-left: 410px; width: 60px; height: 250px; background-color: #fff">
    
</div>
    
<div style="position: absolute; margin-top: 210px; width: 460px; height: 60px; background-color: #fff">
    
</div>
    
<div id="hanoi">
        
<div id="h321000000">
            
&nbsp;<div class="base">
            
</div>
            
<div class="stick1">
            
</div>
            
<div class="stick2">
            
</div>
            
<div class="stick3">
            
</div>
            
<div style="margin-left: 60px; margin-top: -72px;">
                
<div class="disk1">
                
</div>
                
<div class="disk2">
                
</div>
                
<div class="disk3">
                
</div>
            
</div>
            
<div style="margin-left: 171px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
            
</div>
            
<div style="margin-left: 282px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
            
</div>
            
<div class="buttons x1" style="margin-top: -180px;">
                
<href="#h320100000"></a></div>
            
<div class="buttons" style="margin-top: -250px; visibility: hidden;">
            
</div>
        
</div>
        
<div id="h320100000">
            
&nbsp;<div class="base">
            
</div>
            
<div class="stick1">
            
</div>
            
<div class="stick2">
            
</div>
            
<div class="stick3">
            
</div>
            
<div style="margin-left: 60px; margin-top: -72px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk2">
                
</div>
                
<div class="disk3">
                
</div>
            
</div>
            
<div style="margin-left: 171px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk1">
                
</div>
            
</div>
            
<div style="margin-left: 282px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
            
</div>
            
<div class="buttons x1" style="margin-top: -180px; visibility: hidden;">
            
</div>
            
<div class="buttons x2" style="margin-top: -250px">
                
<href="#h321000000"></a><href="#h320000100"></a></div>
        
</div>
        
<div id="h310200000">
            
&nbsp;<div class="base">
            
</div>
            
<div class="stick1">
            
</div>
            
<div class="stick2">
            
</div>
            
<div class="stick3">
            
</div>
            
<div style="margin-left: 60px; margin-top: -72px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk1">
                
</div>
                
<div class="disk3">
                
</div>
            
</div>
            
<div style="margin-left: 171px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk2">
                
</div>
            
</div>
            
<div style="margin-left: 282px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
            
</div>
            
<div class="buttons x1" style="margin-top: -180px;">
                
<href="#h300210000"></a></div>
            
<div class="buttons x2" style="margin-top: -250px">
                
<href="#h310000200"></a></div>
        
</div>
        
<div id="h210300000">
            
&nbsp;<div class="base">
            
</div>
            
<div class="stick1">
            
</div>
            
<div class="stick2">
            
</div>
            
<div class="stick3">
            
</div>
            
<div style="margin-left: 60px; margin-top: -72px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk1">
                
</div>
                
<div class="disk2">
                
</div>
            
</div>
            
<div style="margin-left: 171px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk3">
                
</div>
            
</div>
            
<div style="margin-left: 282px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
            
</div>
            
<div class="buttons x1" style="margin-top: -180px;">
                
<href="#h200310000"></a></div>
            
<div class="buttons x2" style="margin-top: -250px">
                
<href="#h210000300"></a></div>
        
</div>
        
<div id="h300210000">
            
&nbsp;<div class="base">
            
</div>
            
<div class="stick1">
            
</div>
            
<div class="stick2">
            
</div>
            
<div class="stick3">
            
</div>
            
<div style="margin-left: 60px; margin-top: -72px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk3">
                
</div>
            
</div>
            
<div style="margin-left: 171px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk1">
                
</div>
                
<div class="disk2">
                
</div>
            
</div>
            
<div style="margin-left: 282px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
            
</div>
            
<div class="buttons x1" style="margin-top: -180px; visibility: hidden;">
            
</div>
            
<div class="buttons x2" style="margin-top: -250px">
                
<href="#h310200000"></a><href="#h300200100"></a></div>
        
</div>
        
<div id="h200310000">
            
&nbsp;<div class="base">
            
</div>
            
<div class="stick1">
            
</div>
            
<div class="stick2">
            
</div>
            
<div class="stick3">
            
</div>
            
<div style="margin-left: 60px; margin-top: -72px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk2">
                
</div>
            
</div>
            
<div style="margin-left: 171px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk1">
                
</div>
                
<div class="disk3">
                
</div>
            
</div>
            
<div style="margin-left: 282px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
            
</div>
            
<div class="buttons x1" style="margin-top: -180px; visibility: hidden;">
            
</div>
            
<div class="buttons x2" style="margin-top: -250px">
                
<href="#h210300000"></a><href="#h200300100"></a></div>
        
</div>
        
<div id="h100320000">
            
&nbsp;<div class="base">
            
</div>
            
<div class="stick1">
            
</div>
            
<div class="stick2">
            
</div>
            
<div class="stick3">
            
</div>
            
<div style="margin-left: 60px; margin-top: -72px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk1">
                
</div>
            
</div>
            
<div style="margin-left: 171px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk2">
                
</div>
                
<div class="disk3">
                
</div>
            
</div>
            
<div style="margin-left: 282px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
            
</div>
            
<div class="buttons x1" style="margin-top: -180px;">
                
<href="#h000321000"></a></div>
            
<div class="buttons x2" style="margin-top: -250px">
                
<href="#h100300200"></a></div>
        
</div>
        
<div id="h000321000">
            
&nbsp;<div class="base">
            
</div>
            
<div class="stick1">
            
</div>
            
<div class="stick2">
            
</div>
            
<div class="stick3">
            
</div>
            
<div style="margin-left: 60px; margin-top: -72px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
            
</div>
            
<div style="margin-left: 171px; margin-top: -250px;">
                
<div class="disk1">
                
</div>
                
<div class="disk2">
                
</div>
                
<div class="disk3">
                
</div>
            
</div>
            
<div style="margin-left: 282px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
            
</div>
            
<div class="buttons x1" style="margin-top: -180px; visibility: hidden;">
            
</div>
            
<div class="buttons x2" style="margin-top: -250px">
                
<href="#h100320000"></a><href="#h000320100"></a></div>
        
</div>
        
<div id="h320000100">
            
&nbsp;<div class="base">
            
</div>
            
<div class="stick1">
            
</div>
            
<div class="stick2">
            
</div>
            
<div class="stick3">
            
</div>
            
<div style="margin-left: 60px; margin-top: -72px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk2">
                
</div>
                
<div class="disk3">
                
</div>
            
</div>
            
<div style="margin-left: 171px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
            
</div>
            
<div style="margin-left: 282px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk1">
                
</div>
            
</div>
            
<div class="buttons x1" style="margin-top: -180px;">
                
<href="#h300200100"></a></div>
            
<div class="buttons" style="margin-top: -250px; visibility: hidden;">
            
</div>
            
<div class="buttons x3" style="margin-top: -250px">
                
<href="#h320100000"></a></div>
        
</div>
        
<div id="h300200100">
            
&nbsp;<div class="base">
            
</div>
            
<div class="stick1">
            
</div>
            
<div class="stick2">
            
</div>
            
<div class="stick3">
            
</div>
            
<div style="margin-left: 60px; margin-top: -72px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk3">
                
</div>
            
</div>
            
<div style="margin-left: 171px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk2">
                
</div>
            
</div>
            
<div style="margin-left: 282px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk1">
                
</div>
            
</div>
            
<div class="buttons x1" style="margin-top: -180px; visibility: hidden;">
            
</div>
            
<div class="buttons x2" style="margin-top: -250px">
                
<href="#h320000100"></a></div>
            
<div class="buttons x3" style="margin-top: -250px">
                
<href="#h300210000"></a></div>
        
</div>
        
<div id="h200300100">
            
&nbsp;<div class="base">
            
</div>
            
<div class="stick1">
            
</div>
            
<div class="stick2">
            
</div>
            
<div class="stick3">
            
</div>
            
<div style="margin-left: 60px; margin-top: -72px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk2">
                
</div>
            
</div>
            
<div style="margin-left: 171px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk3">
                
</div>
            
</div>
            
<div style="margin-left: 282px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk1">
                
</div>
            
</div>
            
<div class="buttons x1" style="margin-top: -180px;">
                
<href="#h000320100"></a></div>
            
<div class="buttons" style="margin-top: -250px; visibility: hidden;">
            
</div>
            
<div class="buttons x3" style="margin-top: -250px">
                
<href="#h200310000"></a></div>
        
</div>
        
<div id="h000320100">
            
&nbsp;<div class="base">
            
</div>
            
<div class="stick1">
            
</div>
            
<div class="stick2">
            
</div>
            
<div class="stick3">
            
</div>
            
<div style="margin-left: 60px; margin-top: -72px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
            
</div>
            
<div style="margin-left: 171px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk2">
                
</div>
                
<div class="disk3">
                
</div>
            
</div>
            
<div style="margin-left: 282px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk1">
                
</div>
            
</div>
            
<div class="buttons x1" style="margin-top: -180px; visibility: hidden;">
            
</div>
            
<div class="buttons x2" style="margin-top: -250px">
                
<href="#h200300100"></a></div>
            
<div class="buttons x3" style="margin-top: -250px">
                
<href="#h000321000"></a></div>
        
</div>
        
<div id="h310000200">
            
&nbsp;<div class="base">
            
</div>
            
<div class="stick1">
            
</div>
            
<div class="stick2">
            
</div>
            
<div class="stick3">
            
</div>
            
<div style="margin-left: 60px; margin-top: -72px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk1">
                
</div>
                
<div class="disk3">
                
</div>
            
</div>
            
<div style="margin-left: 171px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
            
</div>
            
<div style="margin-left: 282px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk2">
                
</div>
            
</div>
            
<div class="buttons x1" style="margin-top: -180px;">
                
<href="#h300100200"></a></div>
            
<div class="buttons" style="margin-top: -250px; visibility: hidden;">
            
</div>
            
<div class="buttons x3" style="margin-top: -250px">
                
<href="#h310200000"></a></div>
        
</div>
        
<div id="h300100200">
            
&nbsp;<div class="base">
            
</div>
            
<div class="stick1">
            
</div>
            
<div class="stick2">
            
</div>
            
<div class="stick3">
            
</div>
            
<div style="margin-left: 60px; margin-top: -72px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk3">
                
</div>
            
</div>
            
<div style="margin-left: 171px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk1">
                
</div>
            
</div>
            
<div style="margin-left: 282px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk2">
                
</div>
            
</div>
            
<div class="buttons x1" style="margin-top: -180px; visibility: hidden;">
            
</div>
            
<div class="buttons x2" style="margin-top: -250px">
                
<href="#h310000200"></a><href="#h300000210"></a></div>
        
</div>
        
<div id="h100300200">
            
&nbsp;<div class="base">
            
</div>
            
<div class="stick1">
            
</div>
            
<div class="stick2">
            
</div>
            
<div class="stick3">
            
</div>
            
<div style="margin-left: 60px; margin-top: -72px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk1">
                
</div>
            
</div>
            
<div style="margin-left: 171px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk3">
                
</div>
            
</div>
            
<div style="margin-left: 282px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk2">
                
</div>
            
</div>
            
<div class="buttons x1" style="margin-top: -180px;">
                
<href="#h000310200"></a></div>
            
<div class="buttons" style="margin-top: -250px; visibility: hidden;">
            
</div>
            
<div class="buttons x3" style="margin-top: -250px">
                
<href="#h100320000"></a></div>
        
</div>
        
<div id="h000310200">
            
&nbsp;<div class="base">
            
</div>
            
<div class="stick1">
            
</div>
            
<div class="stick2">
            
</div>
            
<div class="stick3">
            
</div>
            
<div style="margin-left: 60px; margin-top: -72px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
            
</div>
            
<div style="margin-left: 171px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk1">
                
</div>
                
<div class="disk3">
                
</div>
            
</div>
            
<div style="margin-left: 282px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk2">
                
</div>
            
</div>
            
<div class="buttons x1" style="margin-top: -180px; visibility: hidden;">
            
</div>
            
<div class="buttons x2" style="margin-top: -250px">
                
<href="#h100300200"></a><href="#h000300210"></a></div>
        
</div>
        
<div id="h210000300">
            
&nbsp;<div class="base">
            
</div>
            
<div class="stick1">
            
</div>
            
<div class="stick2">
            
</div>
            
<div class="stick3">
            
</div>
            
<div style="margin-left: 60px; margin-top: -72px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk1">
                
</div>
                
<div class="disk2">
                
</div>
            
</div>
            
<div style="margin-left: 171px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
            
</div>
            
<div style="margin-left: 282px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk3">
                
</div>
            
</div>
            
<div class="buttons x1" style="margin-top: -180px;">
                
<href="#h200100300"></a></div>
            
<div class="buttons" style="margin-top: -250px; visibility: hidden;">
            
</div>
            
<div class="buttons x3" style="margin-top: -250px">
                
<href="#h210300000"></a></div>
        
</div>
        
<div id="h200100300">
            
&nbsp;<div class="base">
            
</div>
            
<div class="stick1">
            
</div>
            
<div class="stick2">
            
</div>
            
<div class="stick3">
            
</div>
            
<div style="margin-left: 60px; margin-top: -72px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk2">
                
</div>
            
</div>
            
<div style="margin-left: 171px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk1">
                
</div>
            
</div>
            
<div style="margin-left: 282px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk3">
                
</div>
            
</div>
            
<div class="buttons x1" style="margin-top: -180px; visibility: hidden;">
            
</div>
            
<div class="buttons x2" style="margin-top: -250px">
                
<href="#h210000300"></a><href="#h200000310"></a></div>
        
</div>
        
<div id="h100200300">
            
&nbsp;<div class="base">
            
</div>
            
<div class="stick1">
            
</div>
            
<div class="stick2">
            
</div>
            
<div class="stick3">
            
</div>
            
<div style="margin-left: 60px; margin-top: -72px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk1">
                
</div>
            
</div>
            
<div style="margin-left: 171px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk2">
                
</div>
            
</div>
            
<div style="margin-left: 282px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk3">
                
</div>
            
</div>
            
<div class="buttons x1" style="margin-top: -180px;">
                
<href="#h000210300"></a></div>
            
<div class="buttons x2" style="margin-top: -250px">
                
<href="#h100000320"></a></div>
        
</div>
        
<div id="h000210300">
            
&nbsp;<div class="base">
            
</div>
            
<div class="stick1">
            
</div>
            
<div class="stick2">
            
</div>
            
<div class="stick3">
            
</div>
            
<div style="margin-left: 60px; margin-top: -72px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
            
</div>
            
<div style="margin-left: 171px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk1">
                
</div>
                
<div class="disk2">
                
</div>
            
</div>
            
<div style="margin-left: 282px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk3">
                
</div>
            
</div>
            
<div class="buttons x1" style="margin-top: -180px; visibility: hidden;">
            
</div>
            
<div class="buttons x2" style="margin-top: -250px">
                
<href="#h100200300"></a><href="#h000200310"></a></div>
        
</div>
        
<div id="h300000210">
            
&nbsp;<div class="base">
            
</div>
            
<div class="stick1">
            
</div>
            
<div class="stick2">
            
</div>
            
<div class="stick3">
            
</div>
            
<div style="margin-left: 60px; margin-top: -72px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk3">
                
</div>
            
</div>
            
<div style="margin-left: 171px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
            
</div>
            
<div style="margin-left: 282px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk1">
                
</div>
                
<div class="disk2">
                
</div>
            
</div>
            
<div class="buttons x1" style="margin-top: -180px;">
                
<href="#h000300210"></a></div>
            
<div class="buttons" style="margin-top: -250px; visibility: hidden;">
            
</div>
            
<div class="buttons x3" style="margin-top: -250px">
                
<href="#h300100200"></a></div>
        
</div>
        
<div id="h000300210">
            
&nbsp;<div class="base">
            
</div>
            
<div class="stick1">
            
</div>
            
<div class="stick2">
            
</div>
            
<div class="stick3">
            
</div>
            
<div style="margin-left: 60px; margin-top: -72px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
            
</div>
            
<div style="margin-left: 171px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk3">
                
</div>
            
</div>
            
<div style="margin-left: 282px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk1">
                
</div>
                
<div class="disk2">
                
</div>
            
</div>
            
<div class="buttons x1" style="margin-top: -180px; visibility: hidden;">
            
</div>
            
<div class="buttons x2" style="margin-top: -250px">
                
<href="#h300000210"></a></div>
            
<div class="buttons x3" style="margin-top: -250px">
                
<href="#h000310200"></a></div>
        
</div>
        
<div id="h200000310">
            
&nbsp;<div class="base">
            
</div>
            
<div class="stick1">
            
</div>
            
<div class="stick2">
            
</div>
            
<div class="stick3">
            
</div>
            
<div style="margin-left: 60px; margin-top: -72px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk2">
                
</div>
            
</div>
            
<div style="margin-left: 171px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
            
</div>
            
<div style="margin-left: 282px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk1">
                
</div>
                
<div class="disk3">
                
</div>
            
</div>
            
<div class="buttons x1" style="margin-top: -180px;">
                
<href="#h000200310"></a></div>
            
<div class="buttons" style="margin-top: -250px; visibility: hidden;">
            
</div>
            
<div class="buttons x3" style="margin-top: -250px">
                
<href="#h200100300"></a></div>
        
</div>
        
<div id="h000200310">
            
&nbsp;<div class="base">
            
</div>
            
<div class="stick1">
            
</div>
            
<div class="stick2">
            
</div>
            
<div class="stick3">
            
</div>
            
<div style="margin-left: 60px; margin-top: -72px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
            
</div>
            
<div style="margin-left: 171px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk2">
                
</div>
            
</div>
            
<div style="margin-left: 282px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk1">
                
</div>
                
<div class="disk3">
                
</div>
            
</div>
            
<div class="buttons x1" style="margin-top: -180px; visibility: hidden;">
            
</div>
            
<div class="buttons x2" style="margin-top: -250px">
                
<href="#h200000310"></a></div>
            
<div class="buttons x3" style="margin-top: -250px">
                
<href="#h000210300"></a></div>
        
</div>
        
<div id="h100000320">
            
&nbsp;<div class="base">
            
</div>
            
<div class="stick1">
            
</div>
            
<div class="stick2">
            
</div>
            
<div class="stick3">
            
</div>
            
<div style="margin-left: 60px; margin-top: -72px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk1">
                
</div>
            
</div>
            
<div style="margin-left: 171px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
            
</div>
            
<div style="margin-left: 282px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk2">
                
</div>
                
<div class="disk3">
                
</div>
            
</div>
            
<div class="buttons x1" style="margin-top: -180px;">
                
<href="#h000100320"></a></div>
            
<div class="buttons" style="margin-top: -250px; visibility: hidden;">
            
</div>
            
<div class="buttons x3" style="margin-top: -250px">
                
<href="#h100200300"></a></div>
        
</div>
        
<div id="h000100320">
            
&nbsp;<div class="base">
            
</div>
            
<div class="stick1">
            
</div>
            
<div class="stick2">
            
</div>
            
<div class="stick3">
            
</div>
            
<div style="margin-left: 60px; margin-top: -72px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
            
</div>
            
<div style="margin-left: 171px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk1">
                
</div>
            
</div>
            
<div style="margin-left: 282px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk2">
                
</div>
                
<div class="disk3">
                
</div>
            
</div>
            
<div class="buttons x1" style="margin-top: -180px; visibility: hidden;">
            
</div>
            
<div class="buttons x2" style="margin-top: -250px">
                
<href="#h100000320"></a><href="#h000000321"></a></div>
        
</div>
        
<div id="h000000321">
            
&nbsp;<div class="base">
            
</div>
            
<div class="stick1">
            
</div>
            
<div class="stick2">
            
</div>
            
<div class="stick3">
            
</div>
            
<div style="margin-left: 60px; margin-top: -72px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
            
</div>
            
<div style="margin-left: 171px; margin-top: -250px;">
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
                
<div class="disk0" style="visibility: hidden">
                
</div>
            
</div>
            
<div style="margin-left: 282px; margin-top: -250px;">
                
<div class="disk1">
                
</div>
                
<div class="disk2">
                
</div>
                
<div class="disk3">
                
</div>
            
</div>
            
<div class="buttons x1" style="margin-top: -180px; visibility: hidden;">
            
</div>
            
<div class="buttons" style="margin-top: -250px; visibility: hidden;">
            
</div>
            
<div class="buttons x3" style="margin-top: -250px">
                
<href="#h000100320"></a></div>
        
</div>
    
</div>

我也感叹一下Html/CSS的魅力!

别看内容多其实原理很简单,就是把所有情况都用html写出来,然后根据锚点跳动或隐藏。如果感兴趣请仔细研究源码。

上面的这个只是三个塔,如果是真正的汉诺塔,代码该是怎样?我不敢往下想了...您呢?

参考:http://www.romancortes.com

posted @ 2010-02-21 17:07  古道  阅读(1367)  评论(5编辑  收藏  举报