bootstrap3 is compatible with IE8 browser! _javascript skills
Recently I have been using bootstrap, an excellent front-end framework. This framework is very powerful. The framework includes drop-down menus, button groups, button drop-down menus, navigation, navigation bars, breadcrumbs, paging, layout, thumbnails, warning dialog boxes, Progress bars, media objects, etc., bootstrap have been pre-defined. When we create a web page, we only need to directly call the css inside
Bootstrap is a responsive layout. You can get a very excellent layout experience on widescreen computers, ordinary computers, tablets, and mobile phones. This responsive layout is achieved through the Media Query function of CSS3, which matches different styles according to different resolutions. The IE8 browser does not support this excellent CSS3 feature. Bootstrap has written in the development documentation how to use it to be compatible with IE8. If you want to be compatible with IE6 and IE7, you can search for bsie (bootstrap2)
Bootstrap in IE8 is definitely not as perfect as Chrome, Firefox, and IE11. Some components are not guaranteed to be fully compatible, and you still need to hack
1. Use html5 declaration
<!DOCTYPE html> 这里不可以有空格 <html>
Note: It is not feasible to write
2. Add meta tag
Confirm to display the IE version of this page
<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" /> <meta http-equiv="X-UA-Compatible" content="IE=9" />
Note: bootstrap does not support IE compatibility mode. In order to allow IE browser to run the latest rendering mode, the above tag will be added to the page. IE=edge means to force the use of IE's latest kernel, chrome=1 means if IE6 is installed /7/8 and other versions of the browser plug-in Google Chrome Frame
3. Import bootstrap file
4. Introduce html5shiv.min.js and respond.min.js
Let browsers that don’t (fully) support html5 “support” the html5 tag
<!--[if lt IE 9]> <script src="js/bootstrap/html5shiv.min.js"></script> <script src="js/bootstrap/respond.min.js"></script> <![endif]-->
5. Add version 1.X Jquery library
6. When testing under IE8, a problem was found that placeholder is not supported. The following is a method to solve the problem of IE supporting placeholder. The jquery cited in this article is 1.12.0 and passed the test. First quote jquery
<script type="text/javascript" src="js/bootstrap/jquery-1.12.0.min.js"></script> <script src="bootstrap/js/bootstrap.min.js"></script>
You can also use other jquery versions and then introduce
[code]
Then add some code to the file
<script type="text/javascript"> $(function () { $('input, textarea').placeholder(); }); </script>
The code is summarized as follows:
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" /> <meta name="author" content="zhy" /> <title>ie8</title> <link rel="stylesheet" href="css/bootstrap/bootstrap.min.css"> <!--[if lte IE 9]> <script src=js/bootstrap/respond.min.js"></script> <script src=js/bootstrap/html5shiv.min.js"></script> <![endif]--> <script src="js/bootstrap/jquery-1.12.0.min.js"></script> <script src="js/bootstrap/bootstrap.min.js"></script> </head> <body> </body> </html>
Note:
1. Statement to determine IE version under IE
<!--[if lte IE 6]> <![endif]--> IE6及其以下版本可见 <!--[if lte IE 7]> <![endif]--> IE7及其以下版本可见 <!--[if IE 6]> <![endif]--> 只有IE6版本可见 <![if !IE]> <![endif]> 除了IE以外的版本 <!--[if lt IE 8]> <![endif]--> IE8以下的版本可见 <!--[if gte IE 7]> <![endif]-->
IE7 and above versions are visible
lte: It is the abbreviation of Less than or equal to, which means less than or equal to.
lt: It is the abbreviation of Less than, which means less than.
gte: It is the abbreviation of Greater than or equal to, which means greater than or equal to.
gt: It is the abbreviation of Greater than, which means greater than.
!: It means not equal to, which is the same as the inequality judgment symbol in JavaScript
The above is the entire content of this article, I hope it will be helpful to everyone’s study.

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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

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

Many users will encounter freezes or blue screens when operating the computer. At this time, we need to find the most stable win10 version to operate. Overall, it is very easy to use and can make your daily use smoother. The most stable win10 version in history 1. Win10 genuine original system. Here users can use simple operations. The system has been optimized and has strong stability, security and compatibility. Users can follow the steps to achieve the perfect machine. 2. Russian master streamlined The version of win10 has been strictly streamlined and many unnecessary functions and services have been deleted. After streamlining, the system has lower CPU and memory usage and runs faster. 3. Win10 Lite Edition 1909 is installed on multiple computers with different hardware models.

Switch2 is a new model announced by Nintendo at Gamescom 2023. Some players are worried about whether there will be compatibility issues between the new model and the cartridges of previous versions. Let’s take a look. Is switch2 compatible with switch cassette? Answer: switch2 is not compatible with switch cassette. Introduction of Switch 2 cartridges According to information from Nintendo’s production chain company, Switch 2 may use 64GB cartridges. Because it has better performance and supports more 3A game masterpieces, it requires a larger cartridge capacity. Because many game works need to be castrated and compressed before they can be stuffed into a game cartridge. Moreover, Switch cartridges are prone to copying game content, so replace them with new cartridges.

As we all know, a major feature of win11 is its own Android subsystem, which allows us to install Android software without using an emulator. However, there is also the problem of win11 Android application lag. How should this be solved? Is win11 not compatible with dynamic wallpapers? Answer: Win11 is compatible with dynamic wallpapers. If it cannot be used, it may be because the software or system version is lagging behind. If it was just updated, it may be covered by the system wallpaper. 1. If the system or software version is lagging behind, just update the system and dynamic wallpaper software. 2. If it is covered by the system wallpaper, you can try to open "Settings" 3. Then enter the "Background" settings under "Personalization". 4. Then change the personalized background to "Picture" 5. After the modification is completed, you can set the dynamic wallpaper normally

In recent years, the popularity of the Android system in the field of mobile devices has grown rapidly, and many people have begun to pay attention to whether Android applications can also be run on other platforms. As a common operating system, Linux is favored by many people. So the question is, is the Linux system compatible with Android software? The first thing to make clear is that the Linux system and the Android system have certain similarities in the kernel. They are both operating systems based on the Linux kernel. Therefore, theoretically speaking, the Linux system can run

How to resolve d3dx9_43.dll incompatibility. In recent years, the rapid development of computers and games has allowed us to enjoy more entertainment and convenience. However, sometimes when installing or running certain programs, we may encounter some error messages, such as "d3dx9_43.dll is incompatible". In this case, how should we solve this problem? First, let’s understand what this error message means. d3dx9_43.dll is a system file of DirectX, which is used in the operating system

There are many website users who need to use the old version of the browser when browsing, and the new version needs to add compatible outlets before they can be used, so today I will bring you a detailed tutorial on adding compatible outlets in win11. Come and learn. How to add compatible outlets in win11 1. First open the IE browser in the system, click the small gear in the upper right corner of the browser to enter "Settings". 2. Then in the settings menu that opens, open "Compatibility View Settings". 3. Enter the URL to be added in the edit box under Add this website, and then click "Add". 4. Finally, you can see the domain name of the added URL below, and you can access it directly by closing the window.

What should I do if I encounter an incompatible version of Eclipse? [Introduction] As a popular development tool, Eclipse not only provides powerful functions and rich plug-ins, but also has cross-platform features. However, when using Eclipse, you may sometimes encounter version incompatibility issues, which may cause the program to fail to run properly or compile errors. This article will describe how to deal with Eclipse version incompatibility and provide some code examples to solve common compatibility issues. [Solution] Update Ecl

The reason why many friends are still choosing win7 system instead of win10 system is that they are afraid of poor compatibility. In fact, win10 system can now set the compatibility mode of win7. You only need to change the settings in the properties. Let’s take a look at it together. How to make win10 compatible with win71? First, right-click on the program we need to run under win7 system, then open "Properties" 2, then click "Compatibility" above to enter the compatibility tab. 3. Check "Run this program in compatibility mode" in compatibility mode. 4. Then select "Windows 7" from the drop-down menu below. 5. After finishing, just click "Apply" or click "OK".
