Posts

Variable in CSS

  <! DOCTYPE html > < html lang =" en ">   < head >     < meta charset =" UTF-8 " />     < meta name =" viewport " content =" width=device-width, initial-scale=1.0 " />     < title >Css Variables</ title >     < style >       : root {         --color : rgb ( 255 , 0 , 247 );         --seccolor : rgb ( 231 , 164 , 246 );         --defpad : 23 px ;         --defop : 0.4 ;       }       * {         margin: 0 ;         padding: 0 ;       }       . nav {         background-color: var ( --color );       }       ul {         display: flex ;       }       ul li {         opacity:...

Transition Property in CSS

  <! DOCTYPE html > < html lang =" en "> < head >     < meta charset =" UTF-8 ">     < meta name =" viewport " content =" width=device-width, initial-scale=1.0 ">     < title >CSS Transitions</ title >     < style >         . container {             background-color: antiquewhite ;             width: 50 vw ;             height: 40 vh ;         }         . box {             background-color: aquamarine ;             width: 5 vw ;             height: 4 vh ;             /* transition-property: background-color, transform;             transition-duration: 3s;             ...

Transform in CSS

  <! DOCTYPE html > < html lang =" en "> < head >     < meta charset =" UTF-8 ">     < meta name =" viewport " content =" width=device-width, initial-scale=1.0 ">     < title >Css Transform</ title >     < style >         * {             margin: 0 ;             padding: 0 ;         }         . box {             height: 50 px ;             width: 50 px ;             background-color: beige ;             border: 2 px solid black ;             transform: rotate ( 0.125 turn );             transform-origin: -50 % -50 % ;             /* transform: rotateZ(9deg); */ ...

Text decoration in CSS

  <! DOCTYPE html > < html lang =" en "> < head >     < meta charset =" UTF-8 ">     < meta name =" viewport " content =" width=device-width, initial-scale=1.0 ">     < title >Fonts</ title >     < style >         @ import url (' https://fonts.googleapis.com/css2?family=Baloo+Bhai+2&family=Poppins:wght@300&display=swap ');         h1 {             font-family: ' Poppins ', ' Lucida Sans ', ' Lucida Sans Regular ', ' Lucida Grande ', ' Lucida Sans Unicode ', Geneva, Verdana , sans-serif         }         p {             /* font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; */             font-family: ' Baloo Bhai 2 ', sans-serif ;             font-size: 20 px ;    ...

Shadow outline in CSS

  <! DOCTYPE html > < html lang =" en "> < head >     < meta charset =" UTF-8 ">     < meta name =" viewport " content =" width=device-width, initial-scale=1.0 ">     < title >Document</ title >     < style >         . box {             border: 2 px solid black ;             padding: 34 px ;             box-shadow:   5 px 15 px 5 px #70a711;             border-radius: 8 px ;             outline-offset: 20 px ;         }         . text-element { text-shadow: 10 px 5 px 3 px #e695f7 }     </ style > </ head > < body >     < div class =" box ">         I am a box     </ div >     < ...

Selecters in CSS

  <! DOCTYPE html > < html lang =" en "> < head >     < meta charset =" UTF-8 ">     < meta name =" viewport " content =" width=device-width, initial-scale=1.0 ">     < title >CSS Selectors</ title >     < style >         /* Element Selector  */         div {             background-color: red ;         }         /* Class Selector  */         . red {             background-color: red ;         }         /* Id Selector */         # green {             background-color: green ;         }         /* Child Selectors  */         div > p {          ...

Position property in CSS

  <! DOCTYPE html > < html lang =" en "> < head >     < meta charset =" UTF-8 ">     < meta name =" viewport " content =" width=device-width, initial-scale=1.0 ">     < title >CSS Position</ title >     < style >         * {             margin: 0 ;             padding: 0 ;         }         . box {             height: 433 px ;             width: 80 vw ;             padding: 3 px ;             margin: 3 px ;             border: 2 px solid black ;         }         . box1 {             background-color: rgb ( 127 , 209 , 209 );        ...