CSS菜单显示问题

qibhj 2008-11-26 07:54:30
请各位高手指点下小弟,怎么让CSS菜单显示在Flash上面!!代码如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type=text/javascript>
/**
*菜单的构造,需要绑定到onload
*/
startList = function() {
if (document.all&&document.getElementById) {
dropmenuRoot = document.getElementById("dropmenu");
for (i=0; i<dropmenuRoot.childNodes.length; i++) {
node = dropmenuRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
//开始灌水
for(j=0;j<this.childNodes.length;j++){
if (this.childNodes[j].nodeName=="UL"){
if (this.childNodes[j].childNodes[0].nodeName=="LI"){
if (this.offsetLeft+this.childNodes[j].childNodes.length*this.childNodes[j].childNodes[0].offsetWidth-dropmenuRoot.offsetLeft>dropmenuRoot.offsetWidth){
var len=this.childNodes[j].childNodes.length*this.childNodes[j].childNodes[0].offsetWidth; //菜单的长度
(len>dropmenuRoot.offsetWidth) ? this.childNodes[j].style.width=776+"px" : this.childNodes[j].style.width=len+"px"; //给ul设置宽度 如果子菜单比较多,大于容器的宽度,那么ul的宽度就是容器的宽度
len =this.offsetLeft+len-dropmenuRoot.offsetLeft-dropmenuRoot.offsetWidth;
(len>this.offsetLeft-dropmenuRoot.offsetLeft) ? this.childNodes[j].style.marginLeft=-(this.offsetLeft-dropmenuRoot.offsetLeft) : this.childNodes[j].style.marginLeft=-len+"px";
}
}
}
}
}
//灌水完毕
node.onmouseout=function() {
this.className=this.className.replace(" over", "");
}
}
}
}
}
window.onload=startList;
</script>
<script src="../Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
<style type="text/css">
body {
position:absolute;
font-family: "宋体";
font-size: 12px;
font-style: normal;
font-weight: normal;
font-variant: normal;
color: #000000;
background-color: #FFFFFF;
}
ul { margin: 0; padding: 0; }
li { list-style-position: outside; list-style: none;}
a { text-decoration: none; color: #666;}
ul#dropmenu,ul#dropmenu ul{
margin: 0 auto;
text-align: left;
padding: 0;
list-style: none;
z-index: 99;
}
ul#dropmenu {
width: 900px;
display: block;
height: 24px;
clear: both;
border: 1px none #ccc;
text-align: center;
background-color: #4D8270;
}
ul#dropmenu li {
position: relative;
z-index: 999;
float: left;
}
ul#dropmenu ul li{
float: left;
display: block;
}
ul#dropmenu ul {
/*width: 122px;
w\idth: 120px;*/
height: auto;
position: absolute;
text-align: left;
left: 0px;
display: none;
border: solid 1px #ccc;
}
/*当鼠标在子菜单和父菜单上时,父菜单的样式*/
ul#dropmenu li.over a,ul#dropmenu li:hover a{
border-color: #ccc;
background: #c00;
color: #fff;
}
/*将子菜单的样式清除*/
ul#dropmenu li.over ul a,ul#dropmenu li:hover ul a{
font-weight: normal;
color: #666;
background: #fff;;
}
/*子菜单的hover样式*/
ul#dropmenu li.over ul a:hover,ul#dropmenu li:hover ul a:hover{
font-weight: normal;
color: #cc0000;
font-weight: bold;
background: #f6f6f6;
}
/* Styles for Menu Items */
ul#dropmenu a {
display: block;
padding: 0 0 0 10px;
width: 106px;
w\idth: 96px;
color: #666;
line-height: 24px;
}
ul#dropmenu ul li{
width: 110px;
border: 0;
}
/* End */
ul#dropmenu ul a {
FILTER: progid:DXImageTransform.Microsoft.Alpha(opacity=70); /* 透明 */
padding: 2px 0px 2px 10px;
border: 0;
width: 120px;
w\idth: 110px;/* Sub Menu Styles */
}
ul#dropmenu li:hover ul,ul#dropmenu li.over ul {
display: block; /* The magic */
}
</style>
<body>
<table width="900" border="0" align="center">
<tr>
<td rowspan="2"><img src="../image/biel.png" width="100" height="63" /></td>
<td rowspan="2" width="578" height="57" class="td1">伯恩光学(深圳)有限公司
<p>
BIEL CRYSTAL MANUFACTORY (SHENZHEN) LIMITED</td>
<td height="38" colspan="3"> </td>
</tr>
<tr>
<td width="70" height="16" class="td2"><a href="../test/webcn.html">简体中文</a></td>
<td width="70" class="td2"><a href="../test/webhk.html">繁体中文</a></td>
<td width="50" class="td3"><a href="../test/weben.html">English</a></td>
</tr>
</table>
<div id="nav">
<ul id="dropmenu">
<li><a href="webcn.html">主页</a></li>
<li><a>关于伯恩</a>
<ul>
<li><a href="../test/intro.html">公司概述</a></li>
<li><a href="../test/oration.html">董事长致词</a></li>
<li><a href="../test/flack.html">企业宣传</a></li>
<li><a href="../test/apart.html">生产车间</a></li>
</ul>
</li>
<li><a>新闻中心</a>
<ul>
<li><a href="../test/trends.html">伯恩动态</a></li>
<li><a href="../test/craft.html">业内资讯</a></li>
</ul>
</li>
<li><a>产品中心</a>
<ul>
<li><a href="../test/glass.html">玻璃表面</a></li>
<li><a href="../test/sapphire.html">蓝宝石表面</a></li>
<li><a href="../test/phone.html">手机玻璃</a></li>
<li><a href="../test/crystal.html">光学玻璃</a></li>
</ul>
</li>
<li><a>服务支持</a>
<ul>
<li><a href="../test/thought.html">管理理念</a></li>
<li><a href="../test/standard.html">质量标准</a></li>
<li><a href="../test/tap.html">研发力量</a></li>
</ul>
</li>
<li><a>人力资源</a>
<ul>
<li><a href="../test/invite.html">广纳贤才</a></li>
<li><a href="../test/treat.html">员工待遇</a></li>
<li><a href="../test/chance.html">职工机会</a></li>
</ul>
</li>
</ul>
</div>
<table width="900" height="126" align="center">
<tr><td colspan="3"><script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','900','height','200','src','webcn','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','webcn' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="900" height="200">
<param name="movie" value="webcn.swf" />
<param name="quality" value="high" />
<embed src="webcn.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="900" height="200"></embed>
</object></noscript></td></tr>
<tr>
<td width="176">
<table width="176">
<tr><td>企业宣传</td></tr>
<tr><td>不制造,不流出,不良品</td></tr>
<tr><td>品质是企业的生命线</td></tr>
<tr><td>向零缺陷目标前进</td></tr>
<tr><td>向零缺陷目标前进</td></tr>
<tr><td>向零缺陷目标前进</td></tr>
<tr><td>向零缺陷目标前进</td></tr>
<tr><td>向零缺陷目标前进</td></tr>
<tr><td>向零缺陷目标前进</td></tr>
<tr><td>向零缺陷目标前进</td></tr>
</table>
<td width="396">
<table width="396">
<tr><td>最新动态</td></tr>
<tr><td>不制造,不流出,不良品</td></tr>
<tr><td>品质是企业的生命线</td></tr>
<tr><td>向零缺陷目标前进</td></tr>
<tr><td>向零缺陷目标前进</td></tr>
<tr><td>向零缺陷目标前进</td></tr>
<tr><td>向零缺陷目标前进</td></tr>
<tr><td>向零缺陷目标前进</td></tr>
<tr><td>向零缺陷目标前进</td></tr>
<tr><td>向零缺陷目标前进</td></tr>
</table>
</td>
<td width="316">
<table width="316">
<tr><td>安全办</td></tr>
<tr><td>不制造,不流出,不良品</td></tr>
<tr><td>品质是企业的生命线</td></tr>
<tr><td>向零缺陷目标前进</td></tr>
<tr><td>向零缺陷目标前进</td></tr>
<tr><td>向零缺陷目标前进</td></tr>
<tr><td>向零缺陷目标前进</td></tr>
<tr><td>向零缺陷目标前进</td></tr>
<tr><td>向零缺陷目标前进</td></tr>
<tr><td>向零缺陷目标前进</td></tr>
</table>
</td>
</tr>
</table>
<p align="center">Copyright © 2001-2008 biel.com Inc. All Rights Reserved. 版权所有</p>
<p align="center">最佳分辨率:1024*768  联系邮箱:qib@bielcrystal.com</p>
<p align="center">测试浏览器:IE7.0</p>
</body>
</html>
...全文
54 点赞 收藏 1
写回复
1 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
dgboby 2008-11-27
把 <param name="quality" value="high" />

改为
<param name="wmode" value="transparent"/>
设为透明,下一层

测试过可以!
回复
相关推荐
发帖
ASP
创建于2007-09-28

2.8w+

社区成员

ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
申请成为版主
帖子事件
创建了帖子
2008-11-26 07:54
社区公告
暂无公告