I recently made a Web website. I always thought bootstrap was very good. This time I used bootstrap3. There is no problem in chrome, firefox, safari, opera, 360 browser (speed mode), Sogou browser and other browsers. However, I found that the styles could not be displayed under IE8 and IE11, and then searched various Baidu, and finally solved the problem with the help of a netizen’s post. The solution is summarized as follows:
First you need to make sure there is a DOCTYPE declaration at the beginning of your HTML page. DOCTYPE tells the browser what HTML or XHTML specification to use to parse HTML documents, specifically affecting:
Constraint rules for marking attributes and properties
It has an impact on the browser’s rendering mode. Different rendering modes will affect the browser’s parsing of CSS code and even JavaScript scripts
DOCTYPE is very critical. The current best practice is to type in the first line of the HTML document:
<!DOCTYPE html>
The master’s post summarized several reasons for searching for bootstrap. First of all, Bootstrap3 was developed with the principle of mobile devices first, so the reasons may be as follows:
1. The remote address is not called correctly
That is, as long as it is IE9 or below, two special js are called
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> <script src="http://apps.bdimg.com/libs/html5shiv/3.7/html5shiv.min.js"></script> <script src="http://apps.bdimg.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]-->
But I tested and found that just using the above js file is not feasible,
2. The calling method is incorrect
Do not use file:// or @import forms to reference respond.min.js or respond.js or css files
3. Mark the content of the browser (use meta tags to adjust the rendering method of the browser)
bootstrap does not support IE compatibility mode. In order to allow IE browser to run the latest rendering mode, the following tags will be added to the page
IE=edge means that the latest kernel of IE is forced to be used. chrome=1 means that if the browser plug-in Google Chrome Frame for IE6/7/8 and other versions is installed (it can make the user's browser still have the menu and interface of IE, but the user When browsing the web, the Chrome browser kernel is actually used), then the Chrome kernel is used for rendering. For a detailed explanation of this meta tag, please refer to the excellent answers on StackOverflow. For an expert explanation of the tag in English, please refer to
http://stackoverflow.com/questions/6771258/whats-the-difference-if-meta-http-equiv-x-ua-compatible-content-ie-edge-e
I added a sentence
Then that’s it
The kernel controls the Meta tag. Because the current domestic mainstream browsers are dual-core, the meta tag is added to tell the browser which kernel to use to render the page
4.IE8 does not support several properties of container
IE8 does not fully support the use of box-sizing: border-box with min-width, max-width, min-height or max-height. Therefore, the container class in bootstrap v3.0.1 is no longer Use max-width.
5. Problems caused by the order in which JS and CSS are introduced
Must quote css first and then quote js
<link rel="stylesheet" type="text/css" href="bootstrap.min.css" media="screen"/> <script type="text/javascript" src="js/respond.min.js"></script>
6. There are blank lines before and after DOCTYPE
It doesn’t work if there are spaces here, you have to remove them
7. You can also manually modify bootstrap.css
If you are using bootstrap2.1.1, modifying navbar-inner{ filter:none} can solve the problem. If you are using version 3.0, this code is no longer available. For details, please see the link
http://stackoverflow.com/questions/12460190/bootstrap-navbar-does-not-show-in-ie8
8. Use quirks mode (compatibility mode)
When defining a web page, the mode that is backward compatible with old browsers is quirks mode, and the corresponding "standard mode" is standard mode. Specifically, write as before
ttp://www.w3.org/TR/html4/strict.dtd">http://www.w3.org/TR/html4/strict.dtd">
I’ve tested this and it doesn’t work
Finally, I passed the test under IE11, but when I tested under IE8, I found a problem that placeholder is not supported
The following is how to solve the problem of IE supporting placeholder
The jquery cited in this article is 1.11.1 and passed the test. First quote jquery
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
You can also use other jquery versions
Then introduce
The download address of the jquery.placeholder.js filehttps://github.com/mathiasbynens/jquery-placeholder
Then add the code to the file
<script type="text/javascript"> $(function () { // Invoke the plugin $('input, textarea').placeholder(); }); </script>
The above IE6, 7, 8, 9, 10, 11, chrome, firefox, safari, opera, 360 browser (speed mode), Sogou browser test passed, only IE5.5 does not seem feasible, in short the problem is solved At this point, the evil IE6 - just call it soy sauce

JavaScript core data types are consistent in browsers and Node.js, but are handled differently from the extra types. 1) The global object is window in the browser and global in Node.js. 2) Node.js' unique Buffer object, used to process binary data. 3) There are also differences in performance and time processing, and the code needs to be adjusted according to the environment.

JavaScriptusestwotypesofcomments:single-line(//)andmulti-line(//).1)Use//forquicknotesorsingle-lineexplanations.2)Use//forlongerexplanationsorcommentingoutblocksofcode.Commentsshouldexplainthe'why',notthe'what',andbeplacedabovetherelevantcodeforclari

The main difference between Python and JavaScript is the type system and application scenarios. 1. Python uses dynamic types, suitable for scientific computing and data analysis. 2. JavaScript adopts weak types and is widely used in front-end and full-stack development. The two have their own advantages in asynchronous programming and performance optimization, and should be decided according to project requirements when choosing.

Whether to choose Python or JavaScript depends on the project type: 1) Choose Python for data science and automation tasks; 2) Choose JavaScript for front-end and full-stack development. Python is favored for its powerful library in data processing and automation, while JavaScript is indispensable for its advantages in web interaction and full-stack development.

Python and JavaScript each have their own advantages, and the choice depends on project needs and personal preferences. 1. Python is easy to learn, with concise syntax, suitable for data science and back-end development, but has a slow execution speed. 2. JavaScript is everywhere in front-end development and has strong asynchronous programming capabilities. Node.js makes it suitable for full-stack development, but the syntax may be complex and error-prone.

JavaScriptisnotbuiltonCorC ;it'saninterpretedlanguagethatrunsonenginesoftenwritteninC .1)JavaScriptwasdesignedasalightweight,interpretedlanguageforwebbrowsers.2)EnginesevolvedfromsimpleinterpreterstoJITcompilers,typicallyinC ,improvingperformance.

JavaScript can be used for front-end and back-end development. The front-end enhances the user experience through DOM operations, and the back-end handles server tasks through Node.js. 1. Front-end example: Change the content of the web page text. 2. Backend example: Create a Node.js server.

Choosing Python or JavaScript should be based on career development, learning curve and ecosystem: 1) Career development: Python is suitable for data science and back-end development, while JavaScript is suitable for front-end and full-stack development. 2) Learning curve: Python syntax is concise and suitable for beginners; JavaScript syntax is flexible. 3) Ecosystem: Python has rich scientific computing libraries, and JavaScript has a powerful front-end framework.


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

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.
