Combine 2 background colors in css - HTML CSS CSS Property

HTML CSS examples for CSS Property:background-color

Description

Combine 2 background colors in css

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">

html {<!--  ww w .j a  v a  2 s. co m-->
   height: 100%;
}
body {
   height: 100%;
   background: linear-gradient(90deg, pink 50%, cyan 50%);
}
#content {
   position: relative;
   z-index: 2;
   padding: 30px;
   text-align: center;
   font-weight: bold;
   font-family: Arial, sans-serif;
}


      </style> 
 </head> 
 <body> 
  <div id="content"> 
   <p>This is some content.</p> 
  </div>  
 </body>
</html>

Related Tutorials