Define CSS global variables - HTML CSS CSS

HTML CSS examples for CSS:Introduction

Description

Define CSS global variables

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <style>
:root {<!--from  w  ww . ja  va  2s . c o m-->
   --bigfont:100px;
}

#test {
   font-size:var(--bigfont);
}
</style> 
 </head> 
 <body style="text-align:center;margin-top:60px"> 
  <div id="test">
    Michael 
  </div>  
 </body>
</html>

Related Tutorials