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

Dissecting the advantages of class over id when annotating HTML elements

There are very complex HTML structures in web pag...

What should I do if I can't view the source file of a web page?

Q: Whether using Outlook or IE, when you right-cl...

Solve the problem of Nginx returning 404 after configuring proxy_pass

Table of contents 1. Troubleshooting and locating...

Detailed explanation of Nginx forwarding socket port configuration

Common scenarios for Nginx forwarding socket port...

Several situations where div is covered by iframe and their solutions

Similar structures: Copy code The code is as foll...

Markup language - specify CSS styles for text

Click here to return to the 123WORDPRESS.COM HTML ...

Detailed explanation of how to use Docker-Compose commands

You can manage and deploy Docker containers in a ...

Detailed steps to change the default password when installing MySQL in Ubuntu

Step 1: Enter the directory: cd /etc/mysql, view ...

Sample code for implementing history in vuex

I have recently been developing a visual operatio...

How to select all child elements and add styles to them in CSS

method: Take less in the actual project as an exa...

An article tells you how to implement Vue front-end paging and back-end paging

Table of contents 1: Front-end handwritten paging...

How to query or obtain images in a private registry

Docker queries or obtains images in a private reg...

VMware Tools installation and configuration tutorial for Ubuntu

Some time ago, the blogger installed the Ubuntu s...

Instructions for recovering data after accidental deletion of MySQL database

In daily operation and maintenance work, backup o...