ASPX page style error caused by Chinese annotation in CSS
Today, we have encountered a very strange problem: webpage design uses layer layout for pages
After sending it to us, the static html page is normally displayed under IE6,
In vs, after the extension is changed to aspx, the page will be completely changed, the style cannot be applied, and the layout is incorrect.
After that, my colleagues found that the Chinese comments were added to CSS. The Chinese comments in CSS were deleted and displayed normally.
PS: this situation does not appear in IE7, but in Firefox and IE6.
Original article:
If there is no problem with the original HTML + CSS, after you change it to aspx, the. NET environment will change the HTML encoding format to UTF-8 after compilation. If your CSS file is not changed, the CSS becomes invalid.
Check whether the CSS file is garbled. The simplest way is to delete the Chinese comments in the CSS file first.
OK!
Have time to come and play in my hometown!