Javascript 顶部带有输入搜索框的响应式调整大小

Javascript 顶部带有输入搜索框的响应式调整大小,javascript,jquery,datatables,Javascript,Jquery,Datatables,我有以下问题:我使用的数据表顶部有多列过滤。如果您通过此链接观看视频,您可以了解问题: 调整浏览器窗口的大小时,输入搜索字段仍然可见,导致表中出现溢出。 显然,datatable已经通过javascript和responsive选项进行了初始化。 以下是HTML: <section class="content"> <div class="container-fluid"> <div class="block-header"> <

我有以下问题:我使用的数据表顶部有多列过滤。如果您通过此链接观看视频,您可以了解问题:

调整浏览器窗口的大小时,输入搜索字段仍然可见,导致表中出现溢出。 显然,datatable已经通过javascript和responsive选项进行了初始化。 以下是HTML:

<section class="content">
<div class="container-fluid">
    <div class="block-header">
        <h2>
            VISUALIZZAZIONE OFFERTE ABITATIVE
            <small>Qui potrai visualizzare e ricercare qualsiasi offerta abitativa.</small>
        </h2>
    </div>
    <div class="row clearfix">
        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
            <div class="card">
                <div class="body">
                    {$sizeOffers = count($offers)}
                    {if $sizeOffers gt 0}
                        {include file=$smarty.const.DEFAULT_RESOURCES_PATH|cat:'inc/offers.tpl'}
                    {else}
                        <div class="alert alert-warning">
                            Non c'&egrave; nessuna offerta abitativa da visualizzare. Clicca sul pulsante in basso per inserirne una ora.
                        </div>
                    {/if}
                    <hr>
                    <div class="text-center">
                        <a href="/residentialoffer/add" class="btn btn-primary waves-effect">Aggiugi un'offerta</a>
                        {include file=$smarty.const.DEFAULT_RESOURCES_PATH|cat:'inc/back_button.tpl'}
                    </div>
                </div>
            </div>
        </div>
    </div>
    {include file=$smarty.const.DEFAULT_RESOURCES_PATH|cat:'inc/token_field.tpl'}
</div>

视觉化
这是一种视觉化的稻米品质。
{$sizeOffers=count($offers)}
{如果$sizeOffers gt 0}
{include file=$smarty.const.DEFAULT_RESOURCES_PATH | cat:'inc/offers.tpl'}
{else}
非c′è;这是一种视觉化的生活方式。这是一个很好的例子。
{/if}

{include file=$smarty.const.DEFAULT_RESOURCES_PATH | cat:'inc/back_button.tpl'} {include file=$smarty.const.DEFAULT_RESOURCES_PATH | cat:'inc/token_field.tpl'}

如您所见,offers.tpl是一个包含的文件,包含:

<table id="{$id|default:'offers-table'}" class="table table-striped table-bordered table-hover dt-responsive">
<thead>
<tr>
    <th>Azioni</th>
    <th>Identificativo</th>
    {if !isset($from_contact)}
        <th>Offerente</th>
    {/if}
    <th>Affitto/Vendita</th>
    <th>Comune</th>
    <th>Telefono</th>
    <th>Provenienza</th>
    <th>Tipologia</th>
    <th>Prezzo</th>
</tr>
<tr>
    <th>Azioni</th>
    <th>Identificativo</th>
    {if !isset($from_contact)}
        <th>Offerente</th>
    {/if}
    <th>Affitto/Vendita</th>
    <th>Comune</th>
    <th>Telefono</th>
    <th>Provenienza</th>
    <th>Tipologia</th>
    <th>Prezzo</th>
</tr>
</thead>
<tbody>
......
</tbody>

阿齐奥尼
识别
{if!isset($from_contact)}
报价人
{/if}
附加物/卖方
科穆尼
电传
普罗旺尼亚
提波洛尼亚
普雷佐
阿齐奥尼
识别
{if!isset($from_contact)}
报价人
{/if}
附加物/卖方
科穆尼
电传
普罗旺尼亚
提波洛尼亚
普雷佐
......


您能帮助我吗?

通过将任何.table包装到中来创建响应表。table responsive:

<div class="table-responsive">
  <table class="table">
    ...
  </table>
</div>

...

使用媒体查询。当达到特定宽度时,例如900px,为特定字段显示无。感谢您的回复@Hanseffranz。你能给我举一个这样的媒体查询的例子吗?谢谢你已经尝试过这个,但是当我调整窗口大小时,输入搜索框仍然可见。。。