Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Html length size unit px pixel how to set

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the "html length size unit px pixel setting" related knowledge, editor through the actual case to show you the process of operation, the method of operation is simple and fast, practical, I hope that this "html length size unit px pixel setting" article can help you solve the problem.

I. introduction to px

Px is the pixel of the html length unit. For example, our computer and mobile phone displays all use pixels as units, that is, px. The screen discrimination rate of 1200 million 800 actually refers to 1200px * 800px.

Brief introduction of Network picking to PX

Px equals the abbreviation of pixel, and pixel is a pixel, which is not a unit of length in nature. Px is the smallest point in a picture, and a bitmap is made up of these points. 1024px is 1024 pixels, and the easiest thing you can see is the "setting" in the windows desktop properties. If it is 1024 × 768, there are 1024 points on the level tendency and 768 points on the vertical left side. Can anyone tell how big a "spot" is? Or the painting is very small, or it may be very big. If the point is very small, the picture is clear, we call it "high discrimination rate", on the contrary, it is "low resolution". Therefore, the size of pixels will "change", also referred to as "relative to length".

II. Common use of px in div css

Width:300px

Set the width to 300 pixels

Height:100px

Set the equipment height to 100 pixels

Border:1px solid # 000

Set the 1 pixel border

Font-size:12px

Set the device font size to 12 pixels

Padding:10px

Set the inner white (inner margin) bump to 10 pixels

Margin:20px

Set the equipment to control the outer margin up and down to 10 pixels

Wait a minute.

Many CSS tricks will encounter or use px as pixels when configuring values.

This is the end of the content about "how to set html length size units px pixels". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report