Home > Web Front-end > HTML Tutorial > 下拉菜单总是出不来asp_html/css_WEB-ITnose

下拉菜单总是出不来asp_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:29:15
Original
1074 people have browsed it


nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">




" />
" />
<script></script>
<script></script>



<script> <br />$(function() { <br /> $('li').has('ul').mouseover(function(){ <br /> $(this).children('ul').css('visibility','visible'); <br /> }).mouseout(function(){ <br /> $(this).children('ul').css('visibility','hidden'); <br /> }); <br />}); <br /></script>







            
            
            
 
            
                

                                
  • 首  页

  •                             
  • 关于我们

  •                             
  • 新闻

  •                             
  • PE编织线


  •                             
  • 碳素线

  •                             
  • 配件

  •                             
  • 尼龙线

  •                             
  • 联系我们

  •                 

                
            

            
            
            




回复讨论(解决方案)

下拉菜单不用JS的,纯CSS完全可以实现!你的定位有问题!

<!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" /><title><%=stitle&title%></title><meta name="keywords" content="<%=keywords%>" /><meta name="description" content="<%=descriptions%>" /><script type="text/javascript" src="js/jquery-1.8.0.min.js"></script><script type="text/javascript" src="js/jquery.jslides.js"></script><link rel="stylesheet" type="text/css" href="css/jquery.jslides.css" media="screen" /><link href="common/common.css" rel="stylesheet" type="text/css" /><style>#menu, #menu ul {margin: 0;padding: 0;list-style: none;}#menu {zoom: 1;}#menu li {float: left;position: relative;line-height:20px; margin-right:10px;}#menu ul {position: absolute;top: 20px;left:0px;z-index: 1;background: #fff;}#menu li ul{display:none;}#menu li:hover ul {opacity: 1;display:block;margin: 0;}</style></head><body><!--头部--><div class="top">                                    <div class="nav">                             <ul id="menu">                            <li class="float_left"><a href="index.asp">首  页</a></li>                            <li class="float_left"><a href="about.asp">关于我们</a></li>                            <li class="float_left"><a href="news.asp">新闻</a></li>                            <li class="float_left"><a href="PE_BRAID_LINE.asp">PE编织线</a>								<ul>								<li><a>sa11111111111df</a></li>								<li><a>sa222222222222222df</a></li>								<li><a>sa33333333333df</a></li>								  </ul>								  </li>                            <li class="float_left"><a href="fluorocarbon.asp">碳素线</a></li>                            <li class="float_left"><a href="NEEDLES.asp">配件</a></li>                            <li class="float_left"><a href="Monofilament.asp">尼龙线</a></li>                            <li class="float_left"><a href="contact.asp">联系我们</a></li>                </ul>                            </div>                                    </div><!--/头部--></body></html>
Copy after login

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template