BundleConfig contains js, css failure, bundleconfigjs
The bootstrap style was introduced during the mvc project today. But an error occurred while including css and js.
So I checked the information and many people said that the suffix cannot contain ".", so I changed "." In front of min to "-" to work normally.
But why?
I will continue to consult the materials
The. MinPart is already handled by MVC-it will automatically include. JsFiles for Debug mode and. Min. jsFiles for Release mode.
That is to say, mvc has recognized the file we added, but it only loads the file when releasing.. Min.. Therefore, we only need to include all of them, so that mvc can choose their own
Invalid css in html containing JS
The onload event occurs immediately after the page or image is loaded.
How can css control JS output --,
TempCell. innerHTML = "<div id = 'river'> OK </div> ";
TempCell. style. background = "# F00 ";
TempCell. style. background = "# F00 ";
CSS and Js Problems
Css is usually placed in the head. Js depends on the specific situation.
Html Parsing is from top to bottom. When the network speed is very slow, if you put the css file at the bottom of html, elements such as tables, Div, Flash, and images are loaded on the page at. These elements do not display the css style you have defined at the beginning (because they have not read the css referenced at the bottom ), the style will not be displayed until the browser finally reads the bottom css file, which will give the viewer a poor experience.
Js is usually placed in the head, but sometimes it needs to be placed in the body area or the end of html:
1. For example, a js script is used to obtain the ul list with the id list on the page and perform an operation on its settings.
If this js file does not set a mechanism to check whether the list element has been loaded, when this js file is directly placed in the head area, it will be executed when the browser loads it into js, in the body, the ul element of list is loaded after js, and an error occurs when the ul list is not obtained during js execution. Therefore, this js should be referenced after the list element. This problem exists in js, which is frequently used to scroll up, down, left, right, and left images continuously on the Internet.
2. When js is placed at the end of html
Some js functions are not important. loading them does not affect the page functions or appearance. For example, some website traffic statistics code usually gives you a piece of js that requires you to add to the web page to count your website browsing and visitor ip addresses. This type of js can be placed at the bottom of the web page. Because it is a referenced Third-Party website, loading it before will affect the overall rendering speed of Your webpage. put it at the bottom, and your webpage will be presented to the customer, it is not too late to call the js Code that is dragging the network speed.