Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the tips for Web front-end development?

Shulou Source: shulou.com Published: 2022-06-03 06:11:23 11月17日 Update

This article mainly introduces the Web front-end development tips, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to know about it.

Xml files are encoded in utf-8 as far as possible, but some words in gb2312 cannot be stored. For example, even if they can be saved, they still need to be converted, which is troublesome. Utf-8 also conforms to international standards.

In CSS: the pseudo-class hover will become invalid if it is placed before: visited.

If the tag does not have a href attribute, all pseudo-classes of its css, such as hover, are invalidated.

A reference in the form of document.wirte ("") in the js file whose file relative path is the path of the html that references the js.

For example: a.htm reference x\ b.jsjs reference x\ c.js, then file should be x\ c.js rather than the direct path c.js of relative b.js, but the @ import,url () reference in css does not have this problem.

On the page, sometimes the width of talbe is set to 100%, and the right side of the scroll bar will be left blank. Please set the

Do not use img tags for commonly used pictures, use and use css to specify their background and width and height, for dynamic (move up to change the background), use the best, do not need to write additional code, just use the pseudo class: hover, the advantage of using css is to change all at once, which can be well used in skin-changing applications.

@ font-face {

Font-family:comic

Src:url (http://valid_url/some_font_file.eot);

}

To define a font name that does not exist locally, call the

Tags: Support attributes objects tags articles applications events paths utf-8 front end tips development content functions width files text best background questions Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Docker vpn OPPO Reno Shulou Tech Info