search
HomeWeb Front-endCSS TutorialWhat values ​​does display have?
What values ​​does display have?Nov 20, 2023 pm 05:28 PM
display

The values ​​of display include block, inline, none, inline-block, flex, grid, table, inline-table and list-item. Detailed introduction: 1. block, which renders elements into block-level elements. Block-level elements form a block on the page and occupy one line alone; 2. inline, which renders elements into inline elements. Inline elements will not occupy a line by themselves and can be side by side with other elements; 3. none, this value specifies that the element will not be on the page, etc.

What values ​​does display have?

The operating system for this tutorial: Windows 10 system, DELL G3 computer.

In CSS, the display attribute is used to determine the display type of an element. It can have many different values. Here are some main display attribute values:

1. block: Render the element as a block-level element. Block-level elements form a block on the page and occupy its own line. For example, <div>, <code class=" inline" style="box-sizing: border-box; padding: 1px 4px; -webkit-font-smoothing: antialiased; list-style: none; font-family: SFMono-Regular, Consolas, " liberation mono menlo courier monospace margin: font-size: tab-size: background-color: rgba border-radius:><p></p>, <h1></h1>-<h6></h6>, and &lt ;li>, etc. are all default block-level elements.

2, inline: Render elements as inline elements. Inline elements do not occupy a line by themselves and can be placed alongside other elements. For example, <span></span>, <a></a>, etc. are all default inline elements.

3, none: This value specifies that the element will not be displayed on the page. It is different from visibility: hidden, because elements using visibility: hidden will still occupy page space, while elements using display: none are completely removed from the layout Remove.

4. inline-block: Render elements as inline block-level elements. The characteristic of inline block-level elements is that they sit side by side like inline elements, but can set the width and height, and have their own dimensions like block-level elements.

5. flex: Render the element as a flexible box model. The flexbox model is a CSS layout technique for laying out, aligning, and distributing space within a one-dimensional space (rows or columns).

6, grid: Render elements as grid containers. Grid containers lay out, align, and distribute space within two dimensions (rows and columns).

7, table: Render elements into tables. This value was mainly used to display tabular data, but is no longer commonly used because modern CSS technology provides more flexible layout methods.

8. inline-table: Render elements as inline tables. An inline table is similar to an inline block-level element, but has the characteristics of a table, such as margins and padding between cells.

9. list-item: Render elements as list items. When using this value, the element appears as an item in the list, with default bullets or numbering.

In addition to the above main display attribute values, there are also some other values, such as run-in, compact, marker etc., but in modern web development, the use of these values ​​is uncommon. In most cases, using the main values ​​mentioned above will satisfy most layout needs.

The above is the detailed content of What values ​​does display have?. 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
比较:Apple Studio Display vs Samsung Smart Monitor M8比较:Apple Studio Display vs Samsung Smart Monitor M8May 11, 2023 pm 10:46 PM

三星智能显示器M8与AppleStudio显示器:设计和尺寸自推出以来,AppleStudioDisplay就被比作iMac,由相对简单的L形支架上的相对薄的面板组成。这是一种众所周知且深受喜爱的美学,三星似乎借用了它的展示。三星SmartMonitorM8采用了与外观非常相似的支架上的薄屏幕的相同想法。一些次要元素有所不同,例如左下角的小部分有点突出,三星的下巴很薄,但它们在基本设计方面似乎很接近。三星似乎从24英寸iMac中获得了很多灵感。苹果的显示器比三星的要小

Apple Studio Display 的电源线是可拆卸的,但需要特殊工具Apple Studio Display 的电源线是可拆卸的,但需要特殊工具May 17, 2023 pm 03:05 PM

AppleStudioDisplay现已在商店正式发售,全球已有多家客户购买了该产品。与ProDisplayXDR不同,StudioDisplay有一个独特的电源连接器,似乎是不可拆卸的。事实证明,电缆是可拆卸的,但您需要使用特殊工具才能将其卸下。苹果在其网站上表示,StudioDisplay的电源线是不可拆卸的——而且很多用户都这么认为。那是因为用你的双手移除电缆似乎是不可能的,但幸运的是,电缆可以从显示器上分离。,Apple有一个特殊的工具,用于从其新的StudioDispl

对比:Apple Studio Display vs LG UltraFine 5K Display 哪个好?对比:Apple Studio Display vs LG UltraFine 5K Display 哪个好?Apr 16, 2023 pm 08:25 PM

StudioDisplay和LGUltraFine5KDisplay在市场上占有相似的位置,但苹果的显示器要贵300美元。以下是您需要了解的有关这些显示器如何比较的所有信息。六年在科技领域是一段很长的时间,而这也是苹果出售一款价格不超过5,000美元的品牌显示器以来的时间。在此期间,Apple与LG合作销售专门迎合Mac用户的LGUltraFine系列。2019年,Apple停止销售这些LG显示器,转而支持ProDisplayXDR,这在价格适中的Mac友好显

display是什么意思display是什么意思Oct 26, 2023 am 11:50 AM

display通常指的是将数据、信息或结果以某种方式展示给用户或输出到屏幕或其他设备上的操作或功能。具体含义:1、在命令行界面(CLI)中,display可能指的是将文本、表格或其他格式的数据输出到终端窗口,供用户查看或分析;2、在图形用户界面(GUI)中,display可能指的是将图像、文本、图表等内容显示在应用程序的窗口或界面上,以供用户交互或浏览等等。

Boot Camp 更新以支持 Apple Studio DisplayBoot Camp 更新以支持 Apple Studio DisplayMay 20, 2023 pm 11:34 PM

在Mac上运行Windows的IntelMac用户现在可以更新BootCamp中的驱动程序,以支持Apple的StudioDisplay。Apple会定期更新BootCamp,以引入对新硬件的支持,以及典型的兼容性和性能改进。在3月份的软件更新中,Apple已启用BootCamp以与新的StudioDisplay配合使用。将BootCamp带到6.1.17版的更新引入了两个关键支持元素。首先,它增加了对StudioDisplay的兼容性,确

display有哪些取值display有哪些取值Nov 20, 2023 pm 05:28 PM

display的取值有block、inline、none、inline-block、flex、grid、table、inline-table和list-item等。详细介绍:1、block,将元素渲染为块级元素,块级元素在页面上形成一个块,并且独占一行;2、inline,将元素渲染为内联元素。内联元素不会独占一行,可以与其他元素并排;3、none,此值指定元素不会在页面上等等。

Apple Studio Display 适用于 Windows,但有一些限制Apple Studio Display 适用于 Windows,但有一些限制Apr 14, 2023 pm 03:49 PM

Apple本周发布了StudioDisplay,它采用27英寸5K面板,结合了摄像头、麦克风和扬声器,当用户将显示器连接到Mac时,它们可以协同工作。窗户呢?如果出于某种原因您需要在WindowsPC上使用Apple的1599美元显示器,您可以,但有一些限制。当通过Thunderbolt连接(并非每台PC都支持)插入WindowsPC时,StudioDisplay被识别为常规显示器。也就是说,如果您购买了其中一个以将其与Windows一起使用,则需要记

Apple Studio Display 有一个你应该注意的主要缺陷Apple Studio Display 有一个你应该注意的主要缺陷May 18, 2023 pm 07:28 PM

Apple在本周早些时候的PeekPerformance活动中展示了StudioDisplay。该显示器具有典型显示器通常不具备的非凡规格。对于不熟悉的人,StudioDisplay配备前置摄像头、扬声器、USBType-C端口、工作室品质的麦克风阵列和Apple的A13仿生芯片。然而,许多用户不知道的是,AppleStudioDisplay也有一个重大缺陷。那些不注意特定细节的人可能会在以后后悔他们昂贵的购买。这家库比蒂诺科技巨头正在销售StudioDisplay,

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools