html -- control image src using css

control image src using css. This will provide flexibility to change image on your web.
<style>
.imgClass{
 content:url("https://www.google.com/images/srpr/logo11w.png");
}
</style>

<img class="imgClass"/>

Output: the src url of img is a google logo.

No comments:

Post a Comment