give opacity for div - HTML CSS CSS Property

HTML CSS examples for CSS Property:opacity

Description

give opacity for div

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">
.main {<!--   w w  w.  ja v a  2 s . co m-->
   background-image:url('https://www.java2s.com/style/demo/Google-Chrome.png');
   position:relative;
}

.container {
   width:301px;
   height:301px;
}

.sub {
   text-align:center;
   padding:16px;
   border:solid 31px Chartreuse;
   color:yellow;
   text-shadow:0px 0px 6px black;
}
</style> 
 </head> 
 <body> 
  <div class="container"> 
   <div class="main"> 
    <div class="sub">
      Lorem ipsum dolo 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials