【问题标题】:How to change the style of a search bar?如何更改搜索栏的样式?
【发布时间】:2018-05-10 08:17:24
【问题描述】:

我想改变以下搜索栏的样式:

<code><div class="searchbase input-group animated trans" id="searchbase">
    <input type="text" placeholder="<?php _e(_l('Searching...'));?>" class="form-control" id="squery" value="<?php _e($querysearch);?>" data-type="<?php _e(vars('g','type')->v);?>" data-bind="<?php _e(vars('g','bind')->v);?>">
    <span class="input-group-btn">
      <button class="btn btn-warning searchbutton" type="button" onclick="runsearch()"><?php _e(_l('Search'));?></button>
    </span>
 </div></code>

到这个:

http://cssdeck.com/labs/0chmqae2

但在输入要查找的内容时无法弄清楚如何使其可搜索。我不认为它像简单地改变 css 一样简单吗?

【问题讨论】:

  • 当您链接到的示例实际使用 CSS 来实现该效果时,您为什么会这么认为?
  • 不确定你在问什么。是样式问题还是功能问题?

标签: php css search


【解决方案1】:

听起来您在问如何将您的功能与其样式集成。

<div class="field" id="searchform">
    <input type="text" id="squery" placeholder="<?php _e(_l('Searching...')); ?>" value="<?php _e($querysearch); ?>" data-type="<?php _e(vars('g','type')->v); ?>" data-bind="<?php _e(vars('g','bind')->v); ?>">
    <button type="button" onclick="runsearch()" id="search"><?php _e(_l('Search')); ?></button>
</div>

【讨论】:

  • @BenO'Reilly 没问题。如果我已经解决了问题,您能否将我的解决方案标记为已接受的答案?
  • 完成了,你也知道怎么做吗? stackoverflow.com/questions/50630231/…
猜你喜欢
  • 1970-01-01
  • 2018-04-04
  • 1970-01-01
  • 2013-04-16
  • 2013-10-13
  • 2012-05-18
  • 1970-01-01
  • 2019-05-21
相关资源
最近更新 更多