Web front-end development experience summary

Web front-end development experience summary
  1. XML files should be encoded in utf-8 as much as possible. Some characters in gb2312 cannot be stored, such as ?. Even if they can be stored, they need to be converted, which is troublesome. UTF-8 also complies with international standards.
  2. In CSS, the :hover pseudo-class will become invalid if placed before :visited
  3. If the <a> tag does not have an href attribute, all CSS pseudo-classes such as :hover will be invalid.
  4. In js files, use document.write("<script language='javascript' src='" + file + "'></" + "script>" as the reference format, and the file relative path is the path of the HTML that references the js.

    For example: a.htm references x\b.js, b.js references x\c.js, then file should be x\c.js instead of the direct path c.js relative to b.js. However, this problem does not exist in @import and url() references in CSS.
  5. Sometimes, when the width of the talbe is set to 100%, there will be a blank space on the right side of the scroll bar. Please set <body style="overflow:auto">
  6. For commonly used images, do not use the img tag. Use <span><a> and use CSS to specify its background, width and height. For dynamic images (changing the background when moving up), it is best to use <a>. No additional code is required. Just use the pseudo-class :hover. The advantage of using CSS is that all changes can be made at once, which can be well used in skin-changing applications.
  7. @font-face {
    font-family:comic;
    src:url(http://valid_url/some_font_file.eot);
    }
    Define a font name that is not available locally and call <span style="font-family:comic;font-size:18pt>aa</span>
  8. Some CSS
    div { overflow: hidden; text-overflow: ellipsis; }
    td { vertical-align : middle; }
    To force overflow to occur and the ellipsis value to be applied, the author must set the object's white-space property to nowrap .
    If there is no opportunity for line wrapping (for example, the width of the object container is narrow, and there is a long text without reasonable line breaks), overflow is possible even without applying nowrap .
    In order for the ellipsis value to be applied, this property must be set to an object that has an invisible area. The best option is to set the overflow property to hidden.
  9. Firefox's document.createElement does not support HTML tags in the content, nor does it support innerText, but it supports innerHTML, and you can use innerHTML to specify its content.
  10. The width of the DropDownList in the .net control is not colored in Firefox, you need to directly define style='width:10px;'
  11. The CSS cursor in Firefox does not support hand, use pointer instead
  12. The scroll bar in the iframe needs to be set in the iframe tag with style='overflow:hidden', not just in the body, which will cause problems in Firefox
  13. In the onpropertychange event, pay attention to using event.propertyName to filter the property change event. When setting this event, the onpropertychange property has actually been changed, so it will be automatically executed once
  14. The XSL support version in js5.6 is low, such as the document function is not supported
  15. The slice function is slower than looping directly to get array slices
  16. When nextSibling obtains the next object, it is important to note that there should be no space between the two nodes, otherwise it is easy to fail to obtain the correct object.
  17. When using CreateTextFile, the third parameter must be set to true if there is Chinese text in it. Otherwise, Chinese text cannot be written, which results in an error when writing.
  18. Use ADODB.stream when saving Chinese text, do not use fso, because FSO does not support utf-8 format

<<:  A brief discussion on JavaScript throttling and anti-shake

>>:  HTML simple web form creation example introduction

Recommend

Implementation of a simple login page for WeChat applet (with source code)

Table of contents 1. Picture above 2. User does n...

WeChat applet picker multi-column selector (mode = multiSelector)

Table of contents 1. Effect diagram (multiple col...

Detailed tutorial of pycharm and ssh remote access server docker

Background: Some experiments need to be completed...

How to simulate network packet loss and delay in Linux

netem and tc: netem is a network simulation modul...

How to create a database in navicat 8 for mysql

When developing a website, you often need to use ...

CSS3 realizes draggable Rubik's Cube 3D effect

Mainly used knowledge points: •css3 3d transforma...

Nginx server adds Systemd custom service process analysis

1. Take nginx as an example Nginx installed using...

Docker-compose steps to configure the spring environment

Recently, I need to package the project for membe...

CSS 3.0 text hover jump special effects code

Here is a text hovering and jumping effect implem...

Why the explain command may modify MySQL data

If someone asked you whether running EXPLAIN on a...

Echarts Basic Introduction: General Configuration of Bar Chart and Line Chart

1Basic steps of echarts Four Steps 1 Find the DOM...

MySQL uses frm files and ibd files to restore table data

Table of contents Introduction to frm files and i...

TABLE tags (TAGS) detailed introduction

Basic syntax of the table <table>...</tab...