Found 1566 Articles for CSS

Animate box-shadow CSS property

karthikeya Boyini
Updated on 25-Jun-2020 07:21:46

937 Views

To implement animation on box-shadow property with CSS, you can try to run the following codeExampleLive Demo                    div {             width: 200px;             height: 300px;             background: yellow;             border: 10px solid red;             animation: myanim 3s infinite;             bottom: 30px;             position: absolute;          }          @keyframes myanim {             20% {                bottom: 100px;                box-shadow: 30px 45px 70px orange;             }          }                     Performing Animation on box-shadow          

Perform Animation on CSS clip property

Arjun Thakur
Updated on 25-Jun-2020 07:22:35

113 Views

To implement animation on clip property with CSS, you can try to run the following codeExampleLive Demo                    div {             width: 200px;             height: 300px;             background: yellow;             border: 10px solid red;             animation: myanim 3s infinite;             bottom: 30px;             position: absolute;             clip: rect(0,100px,50px,0);          }          @keyframes myanim {             20% {                bottom: 100px;                clip: rect(0,150px,40px,0);             }          }                     Performing Animation on clip property          

CSS Grid Lines

Yaswanth Varma
Updated on 08-Jan-2024 14:56:50

878 Views

A strong layout framework for web design is offered by CSS Grid Lines, which give accurate control over the arrangement and alignment of elements. These grid lines, which include both rows and columns, provide an organized framework that makes it easier to design complex and flexible layouts. Developers may easily organize content and adjust its size and orientation for different screens by using predefined templates. CSS Grid Lines promote more maintainable code by increasing flexibility and removing the need for complex placement hacks. This adaptable tool allows designers to create aesthetically pleasing and dynamic interfaces, completely changing the way web ... Read More

Define the height of each row in CSS Grid Container

George John
Updated on 04-Jul-2020 06:35:02

106 Views

Use the grid-template-rows property to define the number of rows in CSS Grid Layout.ExampleYou can try to run the following code to set a number of rows.Live Demo                    .container {             display: grid;             background-color: gray;             grid-template-rows: 120px 90px 100px;             padding: 20px;             grid-gap: 20px;          }          .container > div {             background-color: yellow;             border: 2px solid gray;             padding: 35px;             font-size: 30px;             text-align: center;          }                     Game Board                1          2          3          4          5          6          

Role of CSS justify-content property center value

Rishi Rathor
Updated on 04-Jul-2020 06:41:35

157 Views

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

Usage of CSS grid-gap property

Ankith Reddy
Updated on 25-Jun-2020 07:14:04

109 Views

Set gap between Grid rows and columns with CSS. You can try to run the following code to implement the grid-gap property.ExampleLive Demo                    .container {             display: grid;             background-color: green;             grid-template-columns: auto auto;             padding: 20px;             grid-gap: 20px 20px;          }          .ele {             background-color: orange;             border: 2px solid gray;             padding: 35px;             font-size: 30px;             text-align: center;          }                     Game Board                1          2          3          4          5          6          

Define the width of each column in CSS Grid Layout

Nancy Den
Updated on 04-Jul-2020 06:38:28

409 Views

To set the width of each column in Grid Layout, use the grid-template-columns property.ExampleYou can try to run the following code to implement it −Live Demo                    .container {             display: grid;             background-color: gray;             grid-template-columns: 120px 80px 50px;             padding: 20px;             grid-gap: 20px;          }          .container > div {             background-color: yellow;             border: 2px solid gray;             padding: 35px;             font-size: 30px;             text-align: center;          }                     Game Board                1          2          3          4          5          6          

How to position text to center on an image with CSS

George John
Updated on 25-Jun-2020 07:11:46

2K+ Views

To positioned text to center an image, use the transform property in CSS. You can try to run the following code for centered text over an imageExampleLive Demo                    .container {             position: relative;          }          .topleft {             position: absolute;             left: 50%;             top: 50%;             transform: translate(-50%, -50%);             font-size: 18px;          }          img {             width: 100%;             height: auto;             opacity: 0.3;          }                     Image Text       Add some text to an image in the center of an image:                          Center          

CSS flex item properties

Chandu yadav
Updated on 25-Jun-2020 07:08:45

191 Views

The following are the flex-item propertiesorderflex-growflex-shrinkflex-basisflexalign-selfLet us see an example of flex-basis propertySet the length of a flex item with the flex-basis CSS property. You can try to run the following code to implement the flex-basis propertyExampleLive 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          

Adjust gap size for CSS Grid

Jennifer Nicholas
Updated on 25-Jun-2020 07:10:46

3K+ Views

To adjust the gap size, use grid-column-gap, grid-row-gap or grid-gap property in CSS.grid-column-gap propertySet gap between Grid columns with CSS. You can try to run the following code to implement the grid-column-gap property.ExampleLive Demo                    .container {             display: grid;             background-color: green;             grid-template-columns: auto auto;             padding: 20px;             grid-column-gap: 20px;          }          .ele {   ... Read More

Advertisements