Semantic-UI List Inverted Variation

Semantic UI is an open-source framework that uses CSS and jQuery to build great user interfaces. It is the same as a bootstrap for use and has great different elements to use to make your website looks more amazing. It uses a class to add CSS to the elements.

Semantic-UI list provides  us different variations of the list, like Horizontal, Inverted, Selection, Animated, Relaxed, Divided, Celled, and Size variants. Here we will learn about Semantic-UI List Inverted Variation is used to display the inverted appearance of list items i.e. it displays the list items with a dark background. 

Semantic-UI List Inverted Variation Class:

  • inverted: This class is used to display the dark background of list items.

Syntax:

<div class="ui inverted segment">
    <div class="ui inverted relaxed divided list">
        <div class="item"> Contents... </div>
    </div>
</div>

Example 1: In this example, we are creating list of items with the inverted variation.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <title>
        Semantic-UI List Inverted Variation
    </title>
  
    <link rel="stylesheet" href=
"https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css" />
</head>
  
<body>
    <div class="ui container">
        <h2 style="color:green">
            w3wiki
        </h2>
  
        <h3>Semantic-UI List Inverted Variation</h3>
  
        <div class="ui inverted segment">
            <div class="ui inverted relaxed divided list">
                <div class="active item">w3wiki</div>
                <a class="item">Data Structure</a>
                <a class="item">Algorithm</a>
                <a class="item">Interview Preparation</a>
                <a class="item">Competitive Programming</a>
                <a class="item">Machine Learning</a>
                <a class="item">Web Development</a>
            </div>
        </div>
    </div>
</body>
  
</html>


Output:

Semantic-UI List Inverted Variation

Example 2: In this example, we are creating list of items with the inverted variation.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <title>
        Semantic-UI List Inverted Variation
    </title>
  
    <link rel="stylesheet" href=
"https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css" />
</head>
  
<body>
    <div class="ui container">
        <h2 style="color:green">
            w3wiki
        </h2>
  
        <h3>Semantic-UI List Inverted Variation</h3>
  
        <div class="ui inverted segment">
            <div class="ui inverted relaxed divided list">
                <div class="item">
                    <img class="ui avatar image" src=
"https://media.w3wiki.net/wp-content/cdn-uploads/gfg_200x200-min.png">
                    <div class="content">
                        <a class="header">w3wiki</a>
                        <div class="description">
                            A Computer Science portal for Beginner. It contains
                            well written, well thought and well explained
                            computer science and programming articles
                        </div>
                    </div>
                </div>
                <div class="item">
                    <img class="ui avatar image" src=
"https://media.w3wiki.net/wp-content/uploads/20200819145636/icon.png">
                    <div class="content">
                        <a class="header">Data Structure</a>
                        <div class="description">
                            A data structure is a particular way of
                            organizing data in a computer so that it
                            can be used effectively.
                        </div>
                    </div>
                </div>
                <div class="item">
                    <img class="ui avatar image" src=
"https://media.w3wiki.net/wp-content/cdn-uploads/20190710102234/download3.png">
                    <div class="content">
                        <a class="header">Algorithm</a>
                        <div class="description">
                            The word Algorithm means “a process or set
                            of rules to be followed in calculations or
                            other problem-solving operations”.
                        </div>
                    </div>
                </div>
                <div class="item">
                    <img class="ui avatar image" src=
"https://media.w3wiki.net/wp-content/cdn-uploads/gfg_200X200.png">
                    <div class="content">
                        <a class="header">Web Development</a>
                        <div class="description">
                            Web development refers to the building,
                            creating, and maintaining of websites.
                            It includes aspects such as web design,
                            web publishing, ...
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
  
</html>


Output:

Semantic-UI List Inverted Variation

Reference: https://semantic-ui.com/elements/list.html#inverted



Contact Us