Div with image inside div and text - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Image Text

Description

Div with image inside div and text

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">
#websiteBG2 {<!--from   w  ww .ja v  a2 s.c o  m-->
   opacity:0.3;
   width:100%;
   border-radius:16px;
   z-align:2;
}

#textboxdiv {
   font:16px Georgia, "Times New Roman", Times, serif;
   color:Chartreuse;
   width:701px;
   height:601px;
   border-radius:16px;
   box-shadow:0px 0px 0px 9px yellow;
   background-color:blue;
   opacity:0.9;
   text-align:center;
   margin-left:auto;
   margin-right:auto;
   z-align:3;
}

#textboxdiv:after {
   content:"";
   background-image:url('https://www.java2s.com/style/demo/Google-Chrome.png');
   background-repeat:no-repeat;
   background-size:100% 100%;
   opacity:0.2;
   top:0;
   left:0;
   bottom:0;
   right:0;
   position:absolute;
   z-index:-2;
   border-radius:16px;
}
</style> 
 </head> 
 <body> 
  <div id="textboxdiv"> 
   <br>Lorem ipsum dolor sit amet, consectetur adi 
  </div>  
 </body>
</html>

Related Tutorials