为了账号安全,请及时绑定邮箱和手机立即绑定

求解啊 为什么第二个li不能显示出来

<!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>淘宝搜索</title>

<style>

*{margin:0;padding:0}

body{font: 12px/1.5 tahoma,arial,'Hiragino Sans GB',\5b8b\4f53,sans-serif;}

a{text-decoration:none}

@font-face{

font-family: iconfont;src:url(http://at.alicdn.com/t/font_1404975816_925991.eot);

src:url(http://at.alicdn.com/t/font_1404975816_925991.eot?#iefix) format("embedded-opentype"),

url(http://at.alicdn.com/t/font_1404975816_925991.woff) format("woff"),

url(http://at.alicdn.com/t/font_1404975816_925991.ttf) format("truetype"),

url(http://at.alicdn.com/t/font_1404975816_925991.svg#uxiconfont) format("svg")} 

.search-container{margin:30px auto;width:700px;overflow:hidden;position:relative}

.search-tips a{color:#6C6C6C}

.search-tips{padding:5px 7px;float:right}

.search-button {float:right}

.btn-search{width:100px;height:45px;color:#FFFFFF;background:#FF4500;border:none;cursor:pointer;font-size:20px;font-weight:bold;line-height:16px;}

.search-common-panel{height:39px;background:#f50;overflow:hidden;padding:3px 0 3px 3px ;width:520px;float:right}

.search-common-panel input{height:39px;line-height:39px;border:0 none;outline:0;background:#fff;width:100%;text-indent:80px;}

.iconfont{font-family:iconfont;font-size:12px;font-style:normal}

.search-common-panel i{position:absolute;top:14px;left:125px;z-index:2;color:#ccc}

.search-list{position:absolute;left:42px;top:3px;width:72px;height:39px;overflow:hidden;background:#FFFFFF;border-left:1px solid #ccc;border-right:1px solid #ccc;}

.search-list li{height:39px;line-height:39px;overflow:hidden;text-align:center}

.search-list li a{color:#6c6c6c}

.selected{background:#f6f6f6}

.trigger-hover{height:auto}

</style>

</head>


<body>

<div class="search-container">

      <div class="search-list" id="search-tab">

      <ul>

          <li id="tab_1" class="selected"><a href="#">宝贝</a></li>

   <li id="tab_2"><a href="#">店铺</a></li>

  </ul>

 </div>

 <div class="search-pannel">

    <form>

   <div class="search-tips ">

     <a href="#">高级<br/>搜索</a>

</div>

<div class="search-button ">

 <button class="btn-search"  type="submit">搜索</button>

</div>

<div class="search-common-panel ">

 <input type="text" />

 <i class="iconfont">&#xe613</i>

</div>

</form>

 </div>

</div>

<script>

   var getDOM=function(id){

   return document.getElementById(id);

   }

   var addEvent=function(id,event,fn){

       var el=getDOM(id)||document;

  if(el.addEventListener){

      el.addEventListener(event,fn,false);

  }

  else if(el.attachEvent){

       el.attachEvent('on'+event,fn);

  }

   }

   addEvent('search-tab','mouseover',function(){

   this.className+=' trigger-hover';

   })

</script>

</body>

</html>


正在回答

0 回答

举报

0/150
提交
取消
搜索框制作
  • 参与学习       66041    人
  • 解答问题       431    个

本课程从简入深讲解搜索框的制作,学习JQ与JS实现Ajax技术的不同点

进入课程

求解啊 为什么第二个li不能显示出来

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信