更改为可见性:隐藏而不是显示:无数据处理消息

时间:2021-12-28 11:48:37

I want to change the display: none to visibility: hidden in processing message of data-table.

我想将显示:none更改为visibility:隐藏在数据表处理消息中。

I am using datatables.net data-table.

我正在使用datatables.net数据表。

1 个解决方案

#1


0  

I too faced this annoying problem. If we look at the code generated by the Datatable, we find that the div that appears is the following :

我也遇到了这个烦人的问题。如果我们看一下Datatable生成的代码,我们会发现出现的div是:

<div id="name_of_your_table_processing" class="dataTables_processing" style="display: none;">
    Your custom text
</div>

So you understand, we will play with the CSS class dataTables_processing. The code below, tested and used by myself put the text in a 150px width div at the top and center of the datatable.

我们将使用CSS类dataTables_processing。下面的代码是我自己测试和使用的,它将文本放在datatable的顶部和中心的一个150像素宽度的div中。

.dataTables_processing {
    position: absolute;
    top: 20px;
    width: 150px;
    text-align: center;
    left: 45%;
}

You can adapt the code to the custom text you want to appear.

您可以将代码调整为您想要显示的自定义文本。

#1


0  

I too faced this annoying problem. If we look at the code generated by the Datatable, we find that the div that appears is the following :

我也遇到了这个烦人的问题。如果我们看一下Datatable生成的代码,我们会发现出现的div是:

<div id="name_of_your_table_processing" class="dataTables_processing" style="display: none;">
    Your custom text
</div>

So you understand, we will play with the CSS class dataTables_processing. The code below, tested and used by myself put the text in a 150px width div at the top and center of the datatable.

我们将使用CSS类dataTables_processing。下面的代码是我自己测试和使用的,它将文本放在datatable的顶部和中心的一个150像素宽度的div中。

.dataTables_processing {
    position: absolute;
    top: 20px;
    width: 150px;
    text-align: center;
    left: 45%;
}

You can adapt the code to the custom text you want to appear.

您可以将代码调整为您想要显示的自定义文本。