Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

VAR IN CSS

/* var */
:root{
    --blue--:#2874f0;
}
/* Css reset */
* {
    margin: 0;
    padding: 0;
}

/* header styles */
header {
    background-color: var(--blue--);
    position: sticky;
    top: 0;
    height: 5vw;
    display: flex;
    justify-content: center;
    align-items: center;
}
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #VAR #IN #CSS
ADD COMMENT
Topic
Name
1+6 =