What’s the difference between these 2, and should it be,
before:
or
after:
Is having it one way better than the other?
Is one way more right than the other?
What’s happening here?
.image:after {
content: "";
background: url(https://i.imgur.com/AJDZEOX.jpg), url(https://i.imgur.com/UzRn6Qx.png), url(https://i.imgur.com/96Q10GA.png), url(https://i.imgur.com/WzHsnG7.png), url(https://i.imgur.com/CzqEXBq.jpg), url(https://i.imgur.com/fOfpsiC.png), url(https://i.imgur.com/b3Rqi4d.png);
width: 0;
height: 0;
visibility: hidden;
}
What’s happening here?
.image:after {
content: "";
background: url(https://i.imgur.com/AJDZEOX.jpg), url(https://i.imgur.com/UzRn6Qx.png), url(https://i.imgur.com/96Q10GA.png), url(https://i.imgur.com/WzHsnG7.png), url(https://i.imgur.com/CzqEXBq.jpg), url(https://i.imgur.com/fOfpsiC.png), url(https://i.imgur.com/b3Rqi4d.png);
width: 0;
height: 0;
visibility: hidden;
}
Also:
Is doing it this way bad?
https://jsfiddle.net/g72cho6j/85/
<div class="hide">
<img src="https://i.imgur.com/AJDZEOX.jpg" alt="" />
<img src="https://i.imgur.com/UzRn6Qx.png" alt="" />
<img src="https://i.imgur.com/96Q10GA.png" alt="" />
<img src="https://i.imgur.com/WzHsnG7.png" alt="" />
<img src="https://i.imgur.com/CzqEXBq.jpg" alt="" />
<img src="https://i.imgur.com/fOfpsiC.png" alt="" />
<img src="https://i.imgur.com/b3Rqi4d.png" alt="" />
</div>
.hide {
display: none;
}
I keep seeing them written with either:
visibility: hidden;
or
display: none;
I’ve even seen one written using both:
display: none;
visibility: hidden;
Is one better than the other, or even using both?
I know all these I’ve listed work in firefox, but I don’t know about other browsers.
This one uses this:
https://jsfiddle.net/g72cho6j/97/
<div class="image">
<img src="https://i.imgur.com/AJDZEOX.jpg" alt="" />
<img src="https://i.imgur.com/UzRn6Qx.png" alt="" />
<img src="https://i.imgur.com/96Q10GA.png" alt="" />
<img src="https://i.imgur.com/WzHsnG7.png" alt="" />
<img src="https://i.imgur.com/CzqEXBq.jpg" alt="" />
<img src="https://i.imgur.com/fOfpsiC.png" alt="" />
<img src="https://i.imgur.com/b3Rqi4d.png" alt="" />
</div>
.image img {
visibility: hidden;
position: absolute;
}