CSS: 'Background-size' and 'background-repeat: repeat' stretch issue - HTML CSS CSS Property

HTML CSS examples for CSS Property:background

Description

CSS: 'Background-size' and 'background-repeat: repeat' stretch issue

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">

#container{<!--   www .j  a  va  2 s .c om-->
   width:200px;
   height:400px;
   background-color:black;
}
#myPattern
{
   background-color:yellow;
   height:50%;
   width:100%;
}


      </style> 
 </head> 
 <body> 
  <div id="container"> 
   <div id="myPattern"></div> 
  </div>  
 </body>
</html>

Related Tutorials