" tag and use the src attribute of the tag to introduce external js files. In the head tag of the web page, you can use the "" tag to introduce external css style sheet files; or use "@ import url("file path");" to introduce external css style files."/> " tag and use the src attribute of the tag to introduce external js files. In the head tag of the web page, you can use the "" tag to introduce external css style sheet files; or use "@ import url("file path");" to introduce external css style files.">

Home>Article>Web Front-end> How to introduce external JS files and CSS style files into web pages

How to introduce external JS files and CSS style files into web pages

青灯夜游
青灯夜游 Original
2020-12-23 15:17:48 6223browse

In a web page, you can use the "3f1c4e4b6b16bbbd69b2ee476dc4f83a" tag and use the src attribute of the tag to introduce external js files. You can use the "2cdf5bf648cf2f33323966d7f58a7f3f" tag in the head tag of a web page to introduce an external css style sheet file; or use "@import url("file path");" to introduce an external css style sheet file.

How to introduce external JS files and CSS style files into web pages

The operating environment of this tutorial: windows7 system, JavaScript1.8.5&&css3 version, Dell G3 computer. This method is suitable for all brands of computers.

Recommended:javascript video tutorial,css video tutorial

Methods to introduce external JS files into web pages

You can introduce external js files through the src attribute of the 3f1c4e4b6b16bbbd69b2ee476dc4f83a tag.

Although the 3f1c4e4b6b16bbbd69b2ee476dc4f83a tag has many other attributes, these attributes are not commonly used, or they all have default values, and these default values usually do not need to be changed, so the src attribute may be the only one you need to know. properties.

     JavaScript的引入 

This way the server will send the JavaScript file to the browser with the MIME type application/x-javascript.

Methods to introduce external CSS files into web pages

1. Introduce external css files through 2cdf5bf648cf2f33323966d7f58a7f3f

In the of the web page use 2cdf5bf648cf2f33323966d7f58a7f3f tag in ;9c3bca370b5104690d9ef395f2c5f8d1 pair to introduce external style sheet files, and use html rules css. < p>

>

The2cdf5bf648cf2f33323966d7f58a7f3f tag defines the relationship between the document and external resources. The most common use of the 2cdf5bf648cf2f33323966d7f58a7f3f tag is to link style sheets.

Syntax:

2. Import css external files through import

CSS @import rules are used to import style rules from other style sheets. These rules must precede all other types of rules, and @import cannot be used in rules of a conditional group.

@import Rule Grammar

@import url("文件路径");

For more programming-related knowledge, please visit:Programming Course! !

The above is the detailed content of How to introduce external JS files and CSS style files into web pages. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn