Why can't the image size be set by the content attribute in pseudo-elements?

div::before {
content: url ("a.png");
display: block;
width: 100px;
height: 100px;
object-fit: fill;
}

The reason why the picture introduced by the content attribute of the

pseudo element cannot set the size to show its inherent size is that its default attribute is boject-fit: none?.
if not, why can"t it be set?
if so, then I have already set up object-fit: fill. Why can"t I set it yet?

Jul.17,2021

object-fit is the style of img . Although pseudo elements can be used to set pictures, they are not img

after all.

you can use the background picture, and then use background-size:cover

div::before{
content: '';
display: block;
width: 100px;
height: 100px;
background:url('a.png')
background-size:cover;
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bec77c-31280.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bec77c-31280.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?