📜  Semantic-UI Divider Variations Section Variant(1)

📅  最后修改于: 2023-12-03 15:34:55.240000             🧑  作者: Mango

Semantic-UI Divider Variations Section Variant

Semantic-UI is a CSS framework that allows web developers to build responsive and visually appealing user interfaces.

One of the components included in Semantic-UI is the Divider, which is used to create separation between content blocks or sections. The Divider has several variations and section variants that can be customized to fit the design and needs of the application.

Variations

The Divider component has several variations that can be used to change the appearance of the dividing line. These variations are applied using the variation class along with the ui divider class.

Standard

The standard variation is the default and is simply a horizontal line. This is achieved by using the ui divider class on an HTML element.

<div class="ui divider"></div>
Inverted

The inverted variation is used when the background of the content section is darker than the background of the divider. This variation is achieved by adding the inverted class along with the ui divider class.

<div class="ui inverted divider"></div>
Vertical

The vertical variation is used when dividing a column of content. This variation is achieved by adding the vertical class along with the ui divider class.

<div class="ui vertical divider"></div>
Icon

The icon variation is used when adding an icon to the divider. This variation is achieved by adding the icon class along with the ui divider class, and then specifying the icon using the content attribute.

<div class="ui icon divider" data-content="Icon"></div>
Header

The header variation is used when adding a header to the divider. This variation is achieved by adding the header class along with the ui divider class, and then specifying the header text using the content attribute.

<div class="ui header divider" data-content="Header"></div>
Section

The section variation is used when dividing a section of content. This variation is achieved by adding the section class along with the ui divider class.

<div class="ui section divider"></div>
Section Variants

In addition to the variations of the Divider component, there are also section variants that can be used to change the appearance of the entire content section. These section variants are applied using the section class along with the variation class.

Clearing

The clearing section variant is used to clear any floated elements inside the content section. This section variant is achieved by adding the clearing class along with the section and variation classes.

<div class="ui clearing section divider"></div>
Fitted

The fitted section variant is used to remove any margin or padding around the content section. This section variant is achieved by adding the fitted class along with the section and variation classes.

<div class="ui fitted section divider"></div>
Hidden

The hidden section variant is used to hide the content section. This section variant is achieved by adding the hidden class along with the section and variation classes.

<div class="ui hidden section divider"></div>
Horizontal

The horizontal section variant is used to display the content section horizontally. This section variant is achieved by adding the horizontal class along with the section and variation classes.

<div class="ui horizontal section divider"></div>
Conclusion

The Semantic-UI Divider component has several variations and section variants that can be used to customize the appearance of the dividing line and the content section. By making use of these variations and section variants, web developers can create visually appealing and functional user interfaces.