当前位置:网站首页>Compatible with Internet Explorer
Compatible with Internet Explorer
2022-06-25 04:52:00 【Kiway.】
Front end small style compatible IE
Yesterday, after work, the leader sent me a screenshot with a disordered style , Then I tested it all over the popular browsers and found nothing , Then ask the leader which browser it is , He says it is 360 Browser compatibility mode , I opened it and found that these compatibilities are for IE Of , Then I sent a message 666.

It is the OK and Cancel buttons that go below , If I change it directly, it will affect other browsers , Only use js distinguish IE browser , And then through js change css style .
The most painful thing is 360 Browser compatibility mode , Cannot audit element , I can only download one IE Come to tune .
Finally I decided which one to change class, The construction started .
The code is as follows :
if (!!window.ActiveXObject || "ActiveXObject" in window){
// Determine whether IE
var class= document.getElementsByClassName('layui-layer');
console.log(class)
class.item(0).style.height = '';
}else{
// Other browsers don't have to deal with it anymore
// console.log('fff')
}
Print element results :

There is only one print out , So I can modify it without a loop .
The main problem encountered is when reviewing elements , Be precise , And can not be changed id and class, Then there is the question of where the code should be written , I started by writing at the top , It doesn't work , Until I find the trigger js To succeed .
Final rendering :


边栏推荐
- DMA double buffer mode of stm32
- The print area becomes smaller after epplus copies the template
- Kotlin Compose 完善toDo项目 Surface 渲染背景 与阴影
- Upgrade PHP to php7 X (III) failure of wechat payment callback
- ROS2/DDS/QoS/主题的记录
- Sleep more, you can lose weight. According to the latest research from the University of Chicago, sleeping more than 1 hour a day is equivalent to eating less than one fried chicken leg
- 绝了!自动点赞,我用 PyAutoGUI!
- 【Keil】ADuCM4050官方库的GPIO输出宏定义
- How to download and use Xiaobai one click reload on the official website
- Why PHP is not safe
猜你喜欢

领导:谁再用 Redis 过期监听实现关闭订单,立马滚蛋!

2.0SpingMVC使用RESTful

Heavy broadcast | phase shift method + mathematical principle derivation of multi frequency heterodyne + implementation

Wechat applet new version prompt update

台式电脑连不上wifi怎么办

JS, BOM, DOM (VI)

File upload vulnerability shooting range upload labs learning (pass1-pass5)

【FLink】access closed classloader classloader.check-leaked-classloader

Part I Verilog quick start

What is Ethernet and how to connect the computer
随机推荐
执行SQL响应比较慢,你有哪些排查思路?
The solution of wechat applet switchtab unable to take parameters
ASEMI三相整流桥的工作原理
为什么TCP握手刚刚好是3次呢?
parallel recovery slave next change & parallel recovery push change
Cannot import name 'escape' from 'jinja2' [solved successfully]
SOC验证环境的启动方式
[Flink] problems and solutions of the continuous growth of checkpoint size in rocksdb incremental mode
There is 404 in the laravel visit, except the home page is redirected; Index php
Student achievement management system based on SSH
Leader: who can use redis expired monitoring to close orders and get out of here!
CTF_ Web: Changan cup-2021 old but a little new & asuka
leetcode1221. 分割平衡字符串
File upload vulnerability shooting range upload labs learning (pass1-pass5)
Kotlin Compose 完善toDo项目 Surface 渲染背景 与阴影
Two hours to take you into the software testing industry (with a full set of software testing learning routes)
【图像融合】基于matlab方向离散余弦变换和主成分分析图像融合【含Matlab源码 1907期】
What if the desktop computer is not connected to WiFi
Excel exports data to SQL and pictures to folder through macro | VBA
Swift rapid development