2013-02-05 51 views
0

這裏可能是什麼問題?在懸停MouseOut時產品選項卡上?因爲我想我的 鼠標懸停菜單淡出什麼時候文本的過渡fadeouts過,請幫忙,謝謝:)這是我的方式觀察mouseout FadeOut麻煩沒有應用JavaScript/jQuery

cann.net78.net

網站是這樣的代碼

<head> 
<style type="text/css"> 
body{font-family:HelveticaLTStd-Light;} 
table{font-size:80%} 
a{color:#f0f0f0;text-decoration:none; 
-o-transition:.5s; 
    -ms-transition:.5s; 
    -moz-transition:.5s; 
    -webkit-transition:.5s; 
    transition:.5s; 
} 
a:hover{color:#006600;} 
font-family:HelveticaLTStd-Light; 
td.menu{background:#DEB887} 
table.menu 
{ 
font-size:100%; 
color:#f0f0f0; 
position:absolute; 
visibility:hidden; 
background:#558800; 
opacity:0.9; 
} 
body { 
background:url(wall.jpg) no-repeat fixed center; 
} 
table 
{ 
border-collapse:collapse; 
} 
table, td, th 
{ 
position:relative; 
} 
</style> 
<script type="text/javascript"> 
function showmenu(elmnt) 
{ 
document.getElementById(elmnt).style.visibility="visible"; 
} 
function hidemenu(elmnt) 
{ 
document.getElementById(elmnt).style.visibility="hidden"; 
} 
</script> 
</head> 

<body> 
<div id="header"> 
<br> 
<br><table border="0" align="center"> 
<tr> 
    <th align="left" width="430"><font color="cccccc" face="HelveticaLTStd-Light" size="15">C-Ann Trading</font><br> 
    <font color="#f0f0f0" size="5">and Computer Services </font> </th> 
    <th width="120" style="border-right:1px solid #000000;border-color:#cccccc"><br><font size="3"><a href="index.html">Home</a></font></th> 
    <th width="120" style="border-right:1px solid #000000;border-color:#cccccc"><br><font size="3"><a href="about.htm">About Us</a></font></th> 
    <th width="120" onmouseover="showmenu('products')" onmouseout="hidemenu('products')" style="border-right:1px solid #000000;border-color:#cccccc"><br><font size="3" color="#f0f0f0">Products</font> 
     <table border="1" class="menu" id="products" width="150"> 
     <tr><th align="left" class="menu"><a href="notebook.htm">&nbsp&nbsp&nbsp&nbsp&nbsp&nbspNotebooks</a></tr></th> 
     <tr><th align="left" class="menu"><a href="monitor.htm">&nbsp&nbsp&nbsp&nbsp&nbsp&nbspMonitors</a></tr></th> 
     <tr><th align="left" class="menu"><a href="component.htm">&nbsp&nbsp&nbsp&nbsp&nbsp&nbspComponents</a></tr></th> 
     <tr><th align="left" class="menu"><a href="software.htm">&nbsp&nbsp&nbsp&nbsp&nbsp&nbspSoftwares</a></tr></th> 
     <tr><th align="left" class="menu"><a href="peripheral.htm">&nbsp&nbsp&nbsp&nbsp&nbsp&nbspPeripherals</a></tr></th> 
     <tr><th align="left" class="menu"><a href="network.htm">&nbsp&nbsp&nbsp&nbsp&nbsp&nbspNetworking</a></tr></th> 
     <tr><th align="left" class="menu"><a href="storage.htm">&nbsp&nbsp&nbsp&nbsp&nbsp&nbspStorage Devices</a></tr></th> 
+2

除了鏈接到您的網站,還包括特定於您的問題的代碼摘錄。 您需要幫助我們來幫助您。 –

+0

我同意@crynix缺乏良好的代碼... –

回答

0

老實說停止使用<table>做這樣一個下拉菜單。使用嵌套的<ul><li>標記,並給一個純粹的CSS解決方案一槍。

http://line25.com/tutorials/how-to-create-a-pure-css-dropdown-menu

如果可以的話,從我看到你的網站的源代碼,也許你應該再從頭開始,在牢記HTML是一種語義標記語言,可以幫助(人和)機器人來識別你的內容。

再想想你的內容,如果你是寫一本書,有一個標題,摘要,一些段落等等

利用好,對於一個簡單的開始:http://www.w3schools.com/html/html_basic.asp

你可能會發現第一眼看起來更加困難,但是你會增長你的技能,並且你會贏得一些你可能會覺得有用的排名。

+0

但是,我問的菜單淡出時間的代碼,而不是我的網頁內容?好吧,感謝您的CSS信息。 – Dhan