jquery - Creating a transparent image with only CSS and HTML -
is possible create image css/html only, without javascript? because content dynamic , image transparent.

you have split image layers:
- the colorful background
- the white layer transparent circle
- 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
Post a Comment