In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "what is the use of html picture labels, absolute paths and relative paths". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Picture label, absolute path and relative path, []
< img >The tag represents a picture, and the function of the img tag is to insert a picture into the page, not to draw the picture into the page.
Src attribute: "insert" the picture into the web page.
Alt attribute: the value can be a piece of text, and when the picture cannot be displayed for various reasons, the value of the alt property will be displayed on the web page.
Width/height property: set the width / height of the picture; not suitable for pictures, can be used for solid color map stretch; the unit can be px, can also be%, the unit is% refers to the percentage of the width and height of the form size.
1.
two。
3.
4. Image
5.
6.
7.
8.
9.
Recommend
< img >Add "/" to the tag to close the tag.
PNG image format is recommended
A picture error icon appears when the picture does not load correctly:
Picture loading error
Possible causes of picture errors:
1. The path name is misspelled
two。 The referenced picture was deleted.
3. Network problem
Pixel: the basic unit of length of the display content, pixel.
Bitmap: each pixel in the picture consists of 4 digits (argb). In principle, it cannot be stretched because it will cause distortion.
A: transparency; r: red; g: green; b: blue
Vector graph: you can stretch at will.
Through the stretching of the picture, a small solid color picture can be pretended to be a large picture, saving the loading of resources.
Absolute path: use the absolute location of the picture on the hard disk to access the picture, usually starting from the root directory and looking for the next directory; in the process of developing web pages, the absolute path is generally not used
Relative path: refers to the path relative to the current web page.
The starting point of the relative path is
The value of src is the path.
".." Represents the directory above the directory where the current web page is located in the path
"." Represents the directory where the current web page is located in the path
1.
This is the end of the content of "what is the use of html picture labels, absolute paths and relative paths". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.