jquery - Creating a transparent image with only CSS and HTML -


is possible create image css/html only, without javascript? because content dynamic , image transparent.

enter image description here

you have split image layers:

  1. the colorful background
  2. the white layer transparent circle
  3. the eye , other icons put inside circle

it this:

html:

<div class="colorful-box">     <div class="box-with-circle">         <span class="eye icon"/>lorem ipsum eye     </div> </div>  <div class="colorful-box">     <div class="box-with-circle">         <span class="ear icon"/>lorem ipsum ear instead     </div> </div> 

css:

.colorful-box{     background: url(link-to-the-colorfull-background.jpg);     width: 400px;     height: 100px;     float: left; }  .box-with-circle{     background: url(white-box-with-transparent-circle.png);     margin: 10px;     width: 380px;     height: 80px;     float: left; }  .icon{     width: 80px;     height: 80px;     float: left;     position: realtive;     top: 80px; /*make fit inside circle*/     left: 80px; /*make fit inside circle*/ }  .eye{     background: url(transparent-eye.png); }  .eye{     background: url(transparent-ear.png); } 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -