css - How to apply webkit to each image -
this may beginner question relating div ids , classes, have applied webkit code css sheet , want use filters on image image basis. having trouble dividing filters , being applied images. below code:
css:
img { -webkit-filter: brightness(18%); -webkit-transition: 5s ease; -moz-transition: 5s ease; -o-transition: 5s ease; -ms-transition: 5s ease; transition: 5s ease; } img:hover { -webkit-filter: brightness(100%); }
html:
<div id="img"> <a href="design.html"> <img src="designwork.png" width="100%" height="100"> <a href="travel.html"> <img src="zurich.png" alt="fivera" width="100%" height="50"> <a href="graphics.html"> <img src="graphics.png" alt="fivera" width="100%" height="50"> <a href="3dmodeling.html"> <img src="3dmodeling.png" alt="fivera" width="100%" height="50"> </div>
thanks help.
you need use css classes. can add class or multiple classes dom element eg
<img>, <div>, <p>
etc. this:
<img class="filter" src="designwork.png" width="100%" height="100">
then in css can apply styles classes using . identifier.
css
.filter { -webkit-filter: brightness(18%); -webkit-transition: 5s ease; -moz-transition: 5s ease; -o-transition: 5s ease; -ms-transition: 5s ease; transition: 5s ease; }
Comments
Post a Comment