What is a pixel (px) in CSS?

前端 未结 7 1952
粉色の甜心
粉色の甜心 2021-02-19 01:33

I am reading an ASP.NET book and it refers to CSS files and talks about pixels. But I never understood it from a resolution, layout, etc. point of view. For example, what does t

7条回答
  •  滥情空心
    2021-02-19 02:10

    A pixel is generally thought of as the smallest single component of a digital image.

    The number of pixels in an image is called resolution.

    The screen resolution is the number of distinct pixels in each dimension that can be displayed by your screen.

    In the css snippet that you posted you're applying 0 pixels of margin and padding to the element with id="header".


    (source: functionx.com)

提交回复
热议问题