About the role of some files on the web
robots.txt file : Tell search engines which pages can be crawled and which pages cannot be crawled through the Robots protocol.
Placement: Placed in the root directory of the website
Specific usage method: https://blog.csdn.net/u010433704/article/details/52350417
favicon.ico icon file: website for making ico icon http://www.bitbug.net
Icon placement location: placed in the root directory of the website
Where the icon is displayed
humans.txt: It contains information about the people who participated in the design and creation of this web page. Specific usage: http://humanstxt.org/ZH
.gitignore file: Ignore files that you don't want to submit in Git. Generally, each Git project needs a ".gitignore" file. The function of this file is to tell Git which files do not need to be added to version management.
Specific usage: https://www.cnblogs.com/kevingrace/p/5690241.html
README.md: project introduction, usage, related links, etc. . .
CHANGELOG.md: Record project version update information, version information, fixed issues, etc.
The .md suffix file is the markdown file, you can use the online editor to edit the markdown file https://dillinger.io/
Web browser compatibility
Header file settings IE document compatibility : used to describe which browser version the current document needs to use to interpret the current document.
Example: Force the use of the latest version of the edge browser to render the current web page (IE11 documents have been abandoned)
IE condition comment (condition selection): Identify the version of IE, and execute the code only when the browser version meets the conditions.
lt: less than
lte: less than or equal to
gt: greater than
GTE: greater than or equal to
! :not equal to
Example: The current browser can only display greetings if the version is greater than IE7
Set the ideal viewport on the mobile terminal and use the viewport meta tag to control the layout :
There must be a sentence in the head of the responsive website: <meta name="viewport" content="width=device-width>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1; user-scalable=no;">
content="width=device-width: Tell the phone that the ideal viewport width is the device width.
Attribute name | Value | description |
---|---|---|
width | Positive integer or device-width | Define the width of the viewport, in pixels |
height | Positive integer or device-height | Define the height of the viewport, the unit is pixel, generally not used |
initial-scale | [0.0-10.0] | Define the initial zoom value |
minimum-scale | [0.0-10.0] | Define the minimum reduction ratio, which must be less than or equal to the maximum-scale setting |
maximum-scale | [0.0-10.0] | Define the maximum zoom ratio, it must be greater than or equal to the minimum-scale setting |
user-scalable | yes/no | Define whether to allow the user to manually zoom the page, the default value is yes |