CSS

CSS Intro

CSS Intro Quiz

CSS Intro Exercise

CSS Basic

CSS Basic Quiz

CSS Basic Exercise

CSS Advance

CSS Advance Quiz

CSS Advance Exercise

CSS3

CSS3 Quiz

CSS3 Exercise

CSS Properties

CSS Functions

CSS Selectors

CSS var() Function

CSS var() Function

 

 

The var() function is used to insert the value of a CSS variable. We can define a variable by placing -- before its name in the :root part.

 

Syntax:-

 

Its syntax is:- var(--name, value)

 

Further Explanation:-

 

Value Description
name Required. The variable name.
value Optional. The fallback value.

Code Explanation

All Tutorials related to CSS Functions

All Sections related to CSS