Css:
.woocommerce-placeholder.wp-post-image {
content: url("DSC0926-1.jpg");
}
/*for firefox*/
.woocommerce-placeholder.wp-post-image::before {
content: url("DSC0926-1.jpg");
}
HTML
<img src="placeholder.png" alt="Placeholder" class="woocommerce-placeholder wp-post-image" scale="0" width="100" height="100">
I am trying to replace the placeholder image via CSS. It works in Chrome and Safari, but the ::before
fix that I put for Firefox, doesn't work. Why is that?
P.S. I know similar questions have been posted before but I have tried all those solutions like :after
and content: ''; background: url('DSC0926-1.jpg');
instead of changing content url is not working either.