There is no way to set the image size that you assign to an element’s pseudo like ::before. But do not fret. There is a workaround.
User David Vasquez of StackOverflow provided a solution for this. See sample CSS.
|
1 2 3 4 5 6 7 8 9 |
.element::before { display: inline-block; width: 16px; height: 16px; margin-right: 5px; content: ''; background: url('my_image.svg') no-repeat 0 0; background-size: 100%; } |