How to solve IE11 css Hack
This time I will bring you how to solve the css Hack of IE11, and what are the precautions to solve the css Hack of IE11. The following is a practical case, let’s take a look.
<script>
// 针对IE10
if(/*@cc_on!@*/false){
document.documentElement.className+=' ie'+document.documentMode;
}
// 针对IE11及非IE浏览器,
// 因为IE11下document.documentMode为11,所以html标签上会加ie11样式类;
// 而非IE浏览器的document.documentMode为undefined,所以html标签上会加ieundefined样式类。
if(/*@cc_on!@*/true){
document.documentElement.className+=' ie'+document.documentMode;
}
<script /><style>
.ie10.testclass{
color:red
}
.ie11.testclass{
color:blue
}
.ieundefined.testclass{
color:green
}
<style />I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to the php Chinese website Other related articles!
Related reading:
How axios makes HTTP request client based on Promise
The above is the detailed content of How to solve IE11 css Hack. For more information, please follow other related articles on the PHP Chinese website!
Hot AI Tools
Undresser.AI Undress
AI-powered app for creating realistic nude photos
AI Clothes Remover
Online AI tool for removing clothes from photos.
Undress AI Tool
Undress images for free
Clothoff.io
AI clothes remover
AI Hentai Generator
Generate AI Hentai for free.
Hot Article
Hot Tools
Notepad++7.3.1
Easy-to-use and free code editor
SublimeText3 Chinese version
Chinese version, very easy to use
Zend Studio 13.0.1
Powerful PHP integrated development environment
Dreamweaver CS6
Visual web development tools
SublimeText3 Mac version
God-level code editing software (SublimeText3)
Hot Topics
1381
52
What should I do if I get an error in ie11 jquery?
Feb 17, 2023 am 10:10 AM
Solution to the ie11 jquery error: 1. Open the ie11 browser and check the error message; 2. Remove the domain name corresponding to the "Compatibility View" setting in IE.
How to solve the problem that win11 cannot use ie11 browser? (win11 cannot use IE browser)
Jan 30, 2024 pm 09:00 PM
More and more users are starting to upgrade the win11 system. Since each user has different usage habits, many users are still using the ie11 browser. So what should I do if the win11 system cannot use the ie browser? Does windows11 still support ie11? Let’s take a look at the solution. Solution to the problem that Win11 cannot use the IE11 browser 1. First, right-click the Start menu and select Command Prompt (Administrator) to open it. 2. After opening, directly enter Netshwinsockreset and press Enter to confirm. 4. After completion, close the command box and restart the system. You can also try the following methods: Method 1. Click the default browser option on the left in the browser settings, and then find it in the pop-up page
What are the common css hacks?
Jul 28, 2022 pm 05:19 PM
There are three common CSS hacks: 1. Conditional hack, the syntax is "<!--[if <conditional keyword>? IE <version number>?]>HTML code block <![endif]-->"; 2. Attribute prefix hack, the syntax is "selector{<hack>?Attribute name:attribute value<hack>?;}"; 3. The selector prefix hack, the syntax is "<hack> selector{style code}".
Hackers can now reconstruct screen content from HDMI\'s electromagnetic radiation
Jul 30, 2024 am 10:01 AM
A concerning vulnerability has been revealed in modern computer systems, as per a new study. Federico Larroca at the University of the Republic in Montevideo, Uruguay, and his colleagues have developed an AI model that can reconstruct digital signals
How to uninstall IE11 browser
Jan 18, 2021 am 09:28 AM
How to uninstall IE11 browser: 1. Click the "Start" button, select "Control Panel" in the open menu, and open the Control Panel program; 2. Select "Programs and Features" in the Control Panel program; 3. In "Programs and Features" interface, click "View installed updates"; 4. Open the "Uninstall updates" page, find and select Internet Explore 11 in the list; 5. Right-click the mouse, and click the "Uninstall" button in the pop-up menu; 6. In the pop-up "Are you sure you want to uninstall this update?" prompt box, select "Yes".
UMC trauma center in Texas - the only one in a 400-mile radius - hit by ransomware attack, ambulances redirected
Oct 02, 2024 am 06:13 AM
A ransomware attack has impacted the University Medical Center (UMC) in Lubbock, Texas, and it's pretty serious - forcing the hospital to divert ambulances to other facilities. The attack, which hit on Friday, has limited operations and affected emer
Extreme data breach may affect over 2 billion people
Aug 15, 2024 pm 06:45 PM
On August the 6th of 2024, one of the largest personal data sets ever leaked hit a dark web forum called Breachforums, free for anybody to download and use. Some 2.7 billion records were contained in the file, which was posted by a user with the hand
A $500-a-month malware dubbed \'Cthulhu Stealer\' targets macOS users and steals sensitive data
Aug 26, 2024 pm 09:35 PM
A new information-stealing malware targeting Apple macOS users has been exposed by cybersecurity researchers. Referred to as "Cthulhu Stealer", it first became available as a malware-as-a-service (MaaS) offering for $500 per month in late 2


