Front End Technology Articles - Page 609 of 860

Usage of hsla() CSS function

Chandu yadav
Updated on 25-Jun-2020 14:07:42

220 Views

To define colors using the Hue-Saturation-Lightness model (HSL), use the hsla() CSS method.You can try to run the following code to implement the hsla() function in CSSExampleLive Demo                    h1 {             background-color:hsl(0,100%,50%);          }          h2 {             background-color:hsl(192,89%,48%);          }          p {             background-color:hsla(290,100%,50%,0.3);          }                     Red Background       Blue Background       This is demo text!    

CSS white-space Property

vanithasree
Updated on 25-Jun-2020 14:05:20

124 Views

Use the white-space property to work with white-space inside an element:ExampleLive Demo                    p.demo1 {             white-space: normal;          }          p.demo2 {             white-space: pre;          }                     Control white-space                This is demo text.          This is demo text.                      This is demo text.          This is demo text.          

Reset all properties with CSS

Ankith Reddy
Updated on 06-Jul-2020 11:28:34

689 Views

Use the all property to reset all the properties. Set all property to initial, inherit or unset.ExampleYou can try to run the following code to implement the CSS all propertyLive Demo                    html {             color: blue;          }          #demo {             background-color: yellow;             color: red;             all: inherit;          }                     CSS all property       This is demo text.    

Display the flex lines at the start of the container with CSS

varun
Updated on 06-Jul-2020 11:27:53

96 Views

Use the align-content property with value flex-start to set the flex lines in the beginning.ExampleYou can try to run the following code to implement the flex-start value:Live Demo                    .mycontainer {             display: flex;             height: 300px;             background-color: blue;             align-content: flex-start;             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          

Set a radial gradient as the background image with CSS

Chandu yadav
Updated on 25-Jun-2020 13:40:14

243 Views

Set a radial gradient as the background image, with radial-gradient() CSS function. You can try to run the following code to implement linear-gradient() function in CSSExampleLive Demo                    #demo {             height: 200px;             background: radial-gradient(green, orange, maroon);          }                     Setting background as radial gradient.          

CSS nav-down property

George John
Updated on 25-Jun-2020 13:39:32

231 Views

The nav-down property is used to move down when you have pressed on down arrow button in keypad. You can try to run the following code to implement the CSS nav-down 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    

CSS font-size-adjust Property

usharani
Updated on 25-Jun-2020 13:38:57

127 Views

Use the font-size-adjust property to preserve the readability when font fallback occurs. You can try to run the following code to implement the font-size-adjust property:ExampleLive Demo                    #demo {             font-size-adjust: 0.90;          }                     Heading Two       With font-size-adjust property:                This is demo text.             Without font-size-adjust property:       This is demo text.    

Animate CSS border-top-color property

Ankith Reddy
Updated on 25-Jun-2020 13:37:36

166 Views

To implement animation on the border-top-color property with CSS, you can try to run the following codeExampleLive Demo                    table,th,td {             border: 2px solid black;          }          #newTable {             width: 500px;             height: 300px;             background: yellow;             border: 15px solid yellow;             animation: myanim 3s infinite;             background-position: bottom left;             background-size: 50px;          }          @keyframes myanim {             30% {                background-color: orange;                border-spacing: 50px;                border-top-color: red;             }          }                     Performing Animation for border top color                             Subject             Student             Marks                                 Maths             Amit             98                                 Science             Sachin             99                    

Usage of CSS grid-auto-flow property

radhakrishna
Updated on 25-Jun-2020 13:18:24

118 Views

Use the grid-auto-flow property to include auto-placed items in the grid.ExampleYou can try to run the following code to implement the grid-auto-flow property with CSS −Live Demo                    .container {             display: grid;             grid-auto-columns: 50px;             grid-auto-flow: column;             grid-gap: 10px;             background-color: red;             padding: 10px;          }          .container>div {             background-color: yellow;             text-align: center;             padding:10px 0;             font-size: 20px;          }                              1          2          3          4          5          6          

Set whether the text of the element can be selected or not with CSS

varma
Updated on 25-Jun-2020 13:16:59

129 Views

Use the CSS user-select property to set whether the text of the element can be selected or not with CSS:ExampleLive Demo                    div {             user-select: none;          }                     This is demo heading       This is demo text. You won't be able to select it.    

Advertisements