The following are the problems and experiences I encountered during development. I spent some time debugging and posted them to avoid detours for everyone. If there are any mistakes, please correct me.
Continuously updated
Try to encode xml files in utf-8 as much as possible. Some words in gb2312 cannot be stored. For example, ©, even if they can be stored, they need to be converted, which is more troublesome, and utf-8 also meets the needs of the same.
International norms
In CSS, the pseudo-class:hover will be invalid if placed in front of:visited.
If the <a> tag does not have a href attribute, all pseudo-classes such as:hover for its css are invalid
In js file, document.wirte("<scriptlanguage='javascript'src='"+file+"'></"+"script>"
Reference, the relative paths of the file are all the paths that reference the html of the js.
For example: a.htm refers to x/b.js, b.js refers to x/c.js, then the file should be x/c.js instead of the direct path c.js relative to b.js, and the
@import, url() reference does not have this problem
In the page, sometimes the width of talbe is set to 100% and the right will leave a blank in the scrollbar. Please set <body
style="overflow:auto">
For commonly used pictures, do not use img tags, use <span><a> and use css to specify its background and width and height. For dynamic ones (move up and change the background)
, it is best to use <a>, there is no need to write extra code, just use pseudo-class:hover, the advantage of using css is to change all changes at once, this
It can be used well in skin-changing applications
@font-face{
font-family:comic;
src:url(http://valid_url/some_font_file.eot);
}
Define a font name that is not locally located and call <spanstyle="font-family:comic;font-size:18pt>aa</span>
Several CSS
div{overflow:hidden;text-overflow:ellipsis;}
td{vertical-align:middle;}
To force overflow to occur and apply the ellipsis value, the author must set the white-space property value of the object to nowrap.
If there is no line break opportunity (for example, the width of the object container is narrow and there is a long text without reasonable lines breaking), no nowrap is applied
It may also overflow.
In order for the ellipsis value to be applied, this property must be set to an object with an invisible area. The best option is to set the overflow property
for hidden
firefox's document.createElement does not support HTML tags in the content, nor does innerText, but supports innerHTML, it is OK
Specify its content with innerHTML
The width of DropDownList in the .net control is not colored under firefox, so you need to directly define style='width:10px;'
The cursor of css in firefox does not support hand, use pointer instead
The scroll bar in the iframe needs to be set in the iframe tag style='overflow:hidden'. It cannot be set only in the body.
Have a problem
When setting this event, pay attention to using event.propertyName to change event filtering. When setting this event, it has actually been
Changed the onpropertychange property, so it will be executed automatically once.
The support version for XSL in js5.6 is lower, such as the document function, it does not support it.