快捷导航

鼠标点击search 改变两个input的边框颜色 为什么实际上的效果是有两个边框[

Document                                      body,ul,ol,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,th,td,figure,figcaption{                          margin: 0;                          padding: 0;                          font-family: 微软雅黑                  }                  a{                          text-decoration:none;                          color:#fff;                  }                  #header{                          margin:0 auto;                          width: 1024px;                          height: 55px;                  }                  #header>ul,li{                          float: left;                          list-style:none;                          line-height: 55px;                  }                  .menu-content{                          margin: 0 auto;                          width: 1240px;                          height: inherit;                  }                  #h1{                          float:left;                          margin-right:10px;                          text-indent: -9999px;                          background: #ff6700;                          width: 55px;                          height: 55px;                          line-height: 55px;                  }                  #h1>a{                          display: block;                          background: url(images/logo-footer.png) no-repeat;                  }                  #header li>a{                          display: block;                          padding:0 10px;                  }                  .list-content{                          float:left;                          padding-left:50px;                          width: 700px;                          height: 55px                  }                  .list-content a{                          color:black;                          transition:all 0.3s;                  }                  .list-content a:hover{                          color:white;                          background:#ff6700;                  }                  .search{                          float:left;                          width: 210px;                          height: 55px;                  }                  .search-txt{                          margin-top:7px;                          float:left;                          width: 170px;                          height: 40px                  }                  .search-txt input{                          padding:0 10px;                          width: 148px;                          height: 38px;                          border:1px solid red;                  }                  .search-input{                          float:left;                  }                  .search-input input{                          margin-top:7px;                          width: 38px;                          height: 40px;                          border:1px solid red;                          border-left:none;                          background: white;                  }                  .search-txt input,.search-input input{                          background: white                  }                  .search-txt input,.search-input input:focus{                          outline: none                  }                  .a{                          border:1px solid red;                  }                                                                                                      小米商城

                                                                           
                                                     
  • 小米手机                                                 
  • 红米                                                 
  • 平板·笔记本                                                 
  • 电视                                                 
  • 盒子·影音                                                 
  • 路由器                                                 
  • 智能硬件                                                 
  • 服务                                                 
  • 社区                                         

免责声明:本内容仅代表回答者见解不代表本站观点,请谨慎对待。

版权声明:作者保留权利,不代表本站立场。

回复

使用道具 举报

参与会员2

你要改变input的边框颜色直接获取input就好了,你获取的是input父级,点击之后你给父级盒子和input都设置了边框
回复

使用道具 举报

一个边框是div的 一个是input的 随便删除一个 或者覆盖一个就可以了
回复

使用道具 举报

可能感兴趣的问答

发新帖
  • 微信访问
  • 手机APP