如何正确使用html中的A扩展搜索表单作为按钮?

时间:2018-07-15 05:06:33

标签: html css twitter-bootstrap-3

为什么所有问题都没有答案,但答案是否正确?我正在尝试使两个搜索表单都将结果发送回去,        container-2,自适应扩展搜索表单(移动设备)可以正常工作。        不展开的搜索表单将不会返回搜索结果!        并删除响应式        扩展搜索表单会使其他搜索表单起作用,这是为什么        发生了吗?

在此和所有搜索表单之前,我还使用了下拉菜单     返回结果完美,所以我认为那会很接近吗?     谢谢您给予我极大的帮助!

  <form class="form-horizontal" action=" 
  {{URL(getLang().'search.html')}}" method="get">                                            
   <div class="col-sm-12 form-search"><div class="input-group">
  <input 
  type="text" class="form-control hidden-xs"  
  name="keyword" class="form-control search_placeholder" 
  id="inputEmail3"
  placeholder="Search...">  

  /* Below is the Dropdown search form that works,but its a dropdown not 
   expanding form */  

       <div class="dropdown" class="input-group">
        <a class="dropdown-toggle" data-toggle="dropdown"> 
   <span class="glyphicon glyphicon-search hidden-sm hidden-md hidden-lg 
             hidden-xl" id="magnify"></span></a>

    <ul class="dropdown-menu" class="input-group-btn "  class="btn btn- 
     signup" type="submit" class="form-horizontal" 
     action="{{URL(getLang().'search.html')}}" method="get"> <button 
       type="submit" id="dropButton">{{trans('')}}</button>
     <li><input type="text" class="form-control"  name="keyword" 
                class="form-control search_placeholder" id="inputEmail3"
                    placeholder="Search..."></li>
        </ul>
        </div>      
  1. .container-2 {
    	width: 300px;
    	vertical-align: middle;
    	white-space: nowrap;
    	position: relative;
    }
    
    .container-2 input#search {
    	width: 50px;
    	height: 50px;
    	background-color: gold;
    	border: none;
    	font-size: 10pt;
    	float: left;
    	color: #262626;
    	border-radius: 5px;
    	color: lime;
    	-webkit-transition: width .55s ease;
      -moz-transition: width .55s ease;
      -ms-transition: width .55s ease;
      -o-transition: width .55s ease;
      transition: width .55s ease;
    }
    
    .container-2 .icon {
    	color: #4f5b66;
    	left: 0;
    	margin-left: 19px;
    	margin-top: 11px;
    	position: absolute;
    	top: 50%;
    	z-index: 1;
    }
    
    .container-2 input#search:focus, .container-2 input#search:active{
      outline:none;
      width: 300px;
      padding-left: 45px;
    }
     
    .container-2:hover input#search{
    width: 300px;
    padding-left: 45px;
    }
     
    .container-2:hover .icon{
      color: green;
    }
    <form class="form-horizontal" 
    action="{{URL(getLang().'search.html')}}" method="get">
     <div class="col-sm-12 form-search">
    		<div class="input-group">
    			<input type="text" class="form-control hidden-xs"  name="keyword" 
    				class="form-control search_placeholder" id="inputEmail3"
    												placeholder="Search...">
    	<span class="input-group-btn "><button class="btn btn-signup hidden-xs"    type="submit " > {{trans('home.SEARCH')}}</button> </span>
    	<div class="navbar-header">
    		<div class="container-2 hidden-sm hidden-md hidden-lg">
    <span class="icon" ><i class="fa fa-search"></i> </span>
    <input type="search" id="search" 
     href="{{URL(getLang().'search.html')}}" method="get"type="text" 
      name="keyword" id="inputEmail3"></input>
     </div>
      </div>
       </div>
        </div>

0 个答案:

没有答案