📜  Semantic-UI Header Variations Inverted Variant(1)

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

Semantic-UI Header Variations Inverted Variant

Semantic-UI is a front-end development framework that allows developers to easily create responsive and attractive user interfaces. One of the many components provided by Semantic-UI is the Header component, which can be customized with several variations and modifiers to suit different design needs. One such variation is the Inverted Variant, which provides a white-on-black look that is especially useful for creating dark themes or backgrounds.

To use the Inverted Variant, you simply need to add the inverted modifier class to the Header element, as shown in the example below:

<div class="ui inverted header">Hello World</div>

This will create a Header element with white text on a black background. The Inverted Variant can also be combined with other variations and modifiers, such as the Size Variation or Icon Modifier:

<div class="ui inverted small icon header">
  <i class="circular chat icon"></i>
  <div class="content">Chat</div>
</div> 

In this example, we've used the Small Variation to create a smaller Header element, and the Icon Modifier to add a circular chat icon. The inverted class is still present to apply the Inverted Variant.

The Inverted Variant can be applied to any Header element, including those with subheaders:

<h2 class="ui inverted dividing header">About Us</h2>
<div class="ui inverted segment">
  <h3 class="ui inverted header">Our Team</h3>
  <p>We are a small but dedicated team of developers...</p>
</div>

In this example, we've used the Dividing Variation to add a horizontal line between the header and content. The inverted class is applied to both the main Header element and the subheader, creating a consistent white-on-black look.

Overall, the Inverted Variant is a powerful tool for creating stylish and accessible designs, especially when combined with other variations and modifiers provided by Semantic-UI.

Note: It's important to keep accessibility in mind when using the Inverted Variant or any other variation that affects text color and contrast. Always test your designs with screen readers and other assistive technologies to ensure they remain legible and usable for all users.

# Semantic-UI Header Variations Inverted Variant

## Overview
- Semantic-UI is a front-end development framework.
- The `Header` component is customizable with several variations and modifiers.
- The `Inverted` variant provides a white-on-black look that is useful for creating dark themes or backgrounds.

## Usage
- To use the Inverted Variant, add the `inverted` modifier class to the Header element.
- The Inverted Variant can be combined with other variations and modifiers, such as the Size Variation or Icon Modifier.
- It can be applied to any Header element, including those with subheaders.

## Example Code
```html
<div class="ui inverted header">Hello World</div>
<div class="ui inverted small icon header">
  <i class="circular chat icon"></i>
  <div class="content">Chat</div>
</div> 
<h2 class="ui inverted dividing header">About Us</h2>
<div class="ui inverted segment">
  <h3 class="ui inverted header">Our Team</h3>
  <p>We are a small but dedicated team of developers...</p>
</div>
Accessibility Considerations
  • Always test your designs with screen readers and other assistive technologies.
  • Ensure that text in an inverted header remains legible and usable for all users.