Home Web Front-end CSS Tutorial What are the values ​​of display in css

What are the values ​​of display in css

Apr 28, 2024 pm 01:42 PM
css arrangement

Display attribute value defines the display form of the element in the document: Block: Block element, occupying the entire line width, can contain inline elements. Inline: Inline elements can only set the width and cannot contain block elements. Inline-block: combines the characteristics of block elements and inline elements, and can include inline elements. None: Hides the element and no longer occupies document space. Flex: A scalable container that controls element arrangement and size. Grid: Grid layout, which can create a layout with multiple columns and multiple rows. Table: Table element, consisting of table header, table body and table foot.

What are the values ​​of display in css

Display attribute value in CSS

The Display attribute defines how the element appears in the document and determines how the element behaves. show. It has the following main values:

1. Block

  • Block element, occupying the width of the entire row
  • You can set the height and width
  • Can contain inline elements

2. Inline

    ##Inline elements do not occupy the entire line
  • Only the width can be set, but the height cannot be set
  • Cannot contain block elements

3. Inline-block

    combined Characteristics of block elements and inline elements
  • Occupy the width of part of the line
  • You can set the height and width
  • Can contain inline elements

4. None

    Hidden elements
  • Elements no longer occupy space in the document
##5. Flex

Scalable container, used to allocate space between elements
  • Can control the arrangement and size of elements
6 . Grid

Grid layout, used to create multi-column and multi-row layouts
  • Can control the position and size of elements
7. Table

Table element, used to display data
  • It consists of table header, table body and table foot
Other values:

run-in
  • list-item
  • table-cell
  • table-column-group
  • table-column
  • table-footer-group
  • table-header-group
  • table-row
  • table-row-group

The above is the detailed content of What are the values ​​of display in css. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
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

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 Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to check traffic on Apple mobile phone How to check traffic on Apple mobile phone May 09, 2024 pm 06:00 PM

How to check data usage on Apple 1. The specific steps to check data usage on Apple mobile phone are as follows: Open the settings of the phone. Click the Cellular button. Scroll down on the cellular network page to see the specific data usage of each application. Click Apply to also set allowed networks. 2. Turn on the phone, find the settings option on the phone desktop, and click to enter. In the settings interface, find "Cellular Network" in the taskbar below and click to enter. In the cellular network interface, find the "Usage" option on the page and click to enter. 3. Another way is to check the traffic by yourself through the mobile phone, but the mobile phone can only see the total usage and will not display the remaining traffic: turn on the iPhone, find the "Settings" option and open it. Select "Bee"

How to sort the list page alphabetically in vscode How to sort the list page alphabetically in vscode How to sort the list page alphabetically in vscode How to sort the list page alphabetically in vscode May 09, 2024 am 09:40 AM

1. First, after opening the vscode interface, click the settings icon button in the lower left corner of the page 2. Then, click the Settings option in the drop-down page column 3. Then, find the Explorer option in the jumped window 4. Finally, on the right side of the page Click the OpenEditorsnaming option, select the alphabetical button from the drop-down page and save the settings to complete the alphabetical sorting

How to set unknown attributes in vscode vscode method to set unknown attributes How to set unknown attributes in vscode vscode method to set unknown attributes May 09, 2024 pm 02:43 PM

1. First, open the settings icon in the lower left corner and click the settings option. 2. Then, find the CSS column in the jumped window. 3. Finally, change the drop-down option in the unknownproperties menu to the error button.

What are the top ten virtual currency trading platforms? Ranking of the top ten virtual currency trading platforms in the world What are the top ten virtual currency trading platforms? Ranking of the top ten virtual currency trading platforms in the world Feb 20, 2025 pm 02:15 PM

With the popularity of cryptocurrencies, virtual currency trading platforms have emerged. The top ten virtual currency trading platforms in the world are ranked as follows according to transaction volume and market share: Binance, Coinbase, FTX, KuCoin, Crypto.com, Kraken, Huobi, Gate.io, Bitfinex, Gemini. These platforms offer a wide range of services, ranging from a wide range of cryptocurrency choices to derivatives trading, suitable for traders of varying levels.

How to isolate styles in components in vue How to isolate styles in components in vue May 09, 2024 pm 03:57 PM

Style isolation in Vue components can be achieved in four ways: Use scoped styles to create isolated scopes. Use CSS Modules to generate CSS files with unique class names. Organize class names using BEM conventions to maintain modularity and reusability. In rare cases, it is possible to inject styles directly into the component, but this is not recommended.

Graphical steps for setting the default properties of CSS in Visual Studio 2019 Graphical steps for setting the default properties of CSS in Visual Studio 2019 May 09, 2024 pm 02:01 PM

1. Open Visual Studio 2019, find its option settings, and click CSS. 2. Here you can see the technical settings of the following attributes. 3. Now you can set text and fill borders here. 4. At this time, you can also set the floating positioning here. 5. At this moment, you can also set the border and background here to complete the operation. 6. Finally, click the OK button here to set the CSS default properties.

How to adjust Sesame Open Exchange into Chinese How to adjust Sesame Open Exchange into Chinese Mar 04, 2025 pm 11:51 PM

How to adjust Sesame Open Exchange to Chinese? This tutorial covers detailed steps on computers and Android mobile phones, from preliminary preparation to operational processes, and then to solving common problems, helping you easily switch the Sesame Open Exchange interface to Chinese and quickly get started with the trading platform.

How to modify the desktop icon layout in win11? Introduction to modification methods How to modify the desktop icon layout in win11? Introduction to modification methods May 09, 2024 pm 05:34 PM

Windows 11 system can modify the desktop layout, so how to do it specifically? Let’s take a look below! To modify the desktop icon layout in Windows 11, you can follow the following steps: 1. Right-click a blank space on the desktop and select "Icon Layout". 2. In the icon layout menu, you can choose different layout options, including automatic arrangement of icons, grid layout, free arrangement of icons and hidden icons. 3. After selecting the appropriate layout option, your desktop icons will automatically be arranged according to the selected layout. Note: In Windows 11, desktop icons have relatively few setting options and are less customizable than previous Windows versions. If you need more advanced desktop customization settings, consider using

See all articles