Found 1594 Articles for CSS

Perform Animation on the background-color property with CSS

karthikeya Boyini
Updated on 25-Jun-2020 11:29:50

142 Views

To implement animation on the background-color property with CSS, you can try to run the following codeExampleLive Demo                    div {             width: 400px;             height: 300px;             background: yellow;             animation: myanim 3s infinite;          }          @keyframes myanim {             20% {                background-color: maroon;             }          }                        

Animated background with CSS

Chandu yadav
Updated on 25-Jun-2020 11:28:48

628 Views

Use the @keyframes to animate. To implement animation on background with CSS, you can try to run the following codeExampleLive Demo                    div {             width: 400px;             height: 300px;             animation: myanim 3s infinite;          }          @keyframes myanim {             30% {                background: green bottom right/50px 50px;             }          }                        

Set the initial length of a flex item with CSS

Samual Sam
Updated on 04-Jul-2020 08:09:38

120 Views

Set the length of a flex item with the flex-basis CSS property.ExampleYou can try to run the following code to implement the flex-basis property −Live Demo                    .mycontainer {             display: flex;             background-color: orange;          }          .mycontainer > div {             background-color: white;             text-align: center;             line-height: 40px;             font-size: 25px;             width: 100px;             margin: 5px;          }                     Quiz                Q1          Q2          Q3          Q4          Q5          Q6          Q7          Q8          Q9          

Specify how much a flex item will shrink relative to the rest of the flex items with CSS

Chandu yadav
Updated on 25-Jun-2020 11:27:35

109 Views

The flex-shrink property shrinks the flex-item.You can try to run the following code to implement the CSS flex-shrink property. ExampleLive Demo                    .mycontainer {             display: flex;             background-color: orange;          }          .mycontainer > div {             background-color: white;             text-align: center;             line-height: 40px;             font-size: 25px;             width: 100px;             margin: 5px;          }                     Quiz                Q1          Q2          Q3          Q4          Q5          Q6          Q7          Q8          Q9          

Set how much a flex item will grow relative to the rest of the flex items with CSS

Samual Sam
Updated on 04-Jul-2020 08:10:20

148 Views

Increase the size of a flex item, using the flex-grow property. Use it with one or more than flex items.ExampleYou can try to run the following code to implement the flex-grow property. Here Q3 flex-item is larger than other items −Live Demo                    .mycontainer {             display: flex;             background-color: orange;             align-content: space-between;          }          .mycontainer > div {             background-color: white;             text-align: center;             line-height: 40px;             font-size: 25px;             width: 100px;             margin: 5px;          }                     Quiz                Q1          Q2          Q3          Q4          Q5          

Display the flex lines in the end of the container with CSS

Arjun Thakur
Updated on 04-Jul-2020 08:10:53

161 Views

Use the align-content property with value flex-end to set the flex lines in the end.ExampleYou can try to run the following code to implement the flex-end valueLive Demo                    .mycontainer {             display: flex;             height: 200px;             background-color: blue;             align-content: flex-end;             flex-wrap: wrap;          }          .mycontainer > div {             background-color: orange;             text-align: center;             line-height: 60px;             font-size: 30px;             width: 100px;             margin: 5px;          }                       Queue                Q1          Q2          Q3          Q4          Q5          Q6          Q7          Q8          

Avoid wrapping flex items with CSS

Yaswanth Varma
Updated on 08-Jan-2024 13:37:42

4K+ Views

The majority of developers and designers employed various methods to produce responsive and flexible layouts prior to the release of the Flexbox layout concept. These methods consist of tables, and floats. Although one can still use these methods, most designers now use the Flexbox model. Users can arrange and organize their webpages either vertically or horizontally with CSS flexbox, which results in visually attractive and easily navigable websites. Flexbox is actually a CSS layout module rather than just a property. In this article we are going to learn about how to avoid wrapping flex items with CSS, this can be ... Read More

Display the flex items with space between the lines in CSS

Lakshmi Srinivas
Updated on 04-Jul-2020 08:11:30

186 Views

Use the justify-content property with value space-between to add space between the lines.ExampleYou can try to run the following code to implement the space-between value −Live Demo                    .mycontainer {             display: flex;             background-color: red;             justify-content: space-between;          }          .mycontainer > div {             background-color: white;             text-align: center;             line-height: 60px;             font-size: 30px;             width: 100px;             margin: 5px;          }                     Quiz                Q1          Q2          Q3          Q4          

Wrap the flex items with CSS

karthikeya Boyini
Updated on 25-Jun-2020 10:29:20

160 Views

To wrap the flex items, use the flex-wrap property. You can try to run the following code to implement the flex-wrap propertyExampleLive Demo                    .mycontainer {             display: flex;             background-color: #D7BDE2;             flex-wrap: wrap;          }          .mycontainer > div {             background-color: white;             text-align: center;             line-height: 40px;             font-size: 25px;             width: 100px;             margin: 5px;          }                     Quiz                Q1          Q2          Q3          Q4          Q5          Q6          Q7          Q8          Q9          

CSS nav-left property

George John
Updated on 25-Jun-2020 10:36:49

182 Views

The nav-left property is used to move left when you have pressed on left arrow button in keypad. You can try to run the following code to implement the CSS nav-left propertyExampleLive Demo                    button {             position: absolute;          }          button#btn1 {             top: 10%;             left: 15%;             nav-index: 1;             nav-right: #btn2;             nav-left: #btn4;             nav-down: #btn2;             nav-up: #btn4;          }          button#btn2 {             top: 30%;             left: 30%;             nav-index: 2;             nav-right: #btn3;             nav-left: #btn1;             nav-down: #btn3;             nav-up: #btn1;          }          button#btn3 {             top: 50%;             left: 15%;             nav-index: 3;             nav-right: #btn4;             nav-left: #btn2;             nav-down: #btn4;             nav-up: #btn2;          }          button#btn4 {             top: 30%;             left: 0%;             nav-index: 4;             nav-right: #btn1;             nav-left: #btn3;             nav-down: #btn1;             nav-up: #btn3;          }                     Result1       Result2       Result3       Result4    

Advertisements