解决layui-table单元格设置为百分比在ie8下不能自适应的问题
作者:violectyc 时间:2024-04-29 13:18:26
1.如果没有采用响应式布局,指定表格的宽度即可解决比如
table{
width:1400px !important;
}
2.如果采用了响应式布局,使用media query查询不同分辨率下的table宽度,然后指定大小即可,在ie8下支持css3和响应式可以使用
selectivizr-min.js和respond.js。
代码如下
<script src="${LUI_ContextPath}/resource/js/jquery.js"></script>
<script src="${LUI_ContextPath}/km/front/standard/plugin/ie8plugin/selectivizr-min.js">
<script src="${LUI_ContextPath}/km/front/standard/plugin/ie8plugin/respond.js"></script>
@media screen and (min-width: 1570px) and (max-width: 1920px) {
table{
width:1400px !important;
}
}
ps:使用了selectivizr-min.js时确保你的页面使用了jQuery或者其他的js库,如果没有selectivizr-min.js不会起作用。
来源:https://blog.csdn.net/violectyc/article/details/82877045
标签:layui,table,单元格,百分比,自适应
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
PHP实现克鲁斯卡尔算法实例解析
2023-09-08 19:35:57
python web框架 django wsgi原理解析
2021-11-21 02:44:59
ASP.NET技巧:同时对多个文件进行大量写操作对性能优化
2023-07-08 12:22:37
如何在SQL2000的查询中使用XML-Data?
2010-06-18 19:26:00
Python虽然很火找工作为什么这么难
2022-10-29 11:33:03
![](https://img.aspxhome.com/file/2023/2/132352_0s.jpg)
PHP读取和写入CSV文件的示例代码
2023-05-24 23:54:02
vuex 解决报错this.$store.commit is not a function的方法
2024-05-08 09:34:14
![](https://img.aspxhome.com/file/2023/8/130268_0s.png)
python+selenium实现12306模拟登录的步骤
2021-06-18 15:32:56
elementui源码学习仿写el-collapse示例
2024-05-09 15:25:03
![](https://img.aspxhome.com/file/2023/4/126424_0s.png)
java正则表达式提取数字的方法实例
2022-07-09 12:49:31
在python3.9下如何安装scrapy的方法
2023-11-26 10:39:58
![](https://img.aspxhome.com/file/2023/3/135033_0s.jpg)
mysql5.6.8源码安装过程
2024-01-22 02:53:41
python选择排序算法的实现代码
2021-06-19 07:51:10
Python Numpy,mask图像的生成详解
2022-12-03 01:08:45
基于PyQT5制作英雄联盟全皮肤下载器
2023-07-03 15:54:08
![](https://img.aspxhome.com/file/2023/2/134442_0s.png)
Oracle学习笔记(六)
2012-01-05 18:55:27
Python寻找路径和查找文件路径的示例
2023-05-01 10:36:37
sql存储过程获取汉字拼音头字母函数
2011-11-03 16:58:05
go语言里包的用法实例
2024-02-02 10:24:33
Python素数检测的方法
2021-02-13 13:07:30