undefinedfix
Sign in

Take a picture from the web page and use it as the background image. After using it, it is found that it has been enlarged. When setting background - size : one hundred % And then returned to normal. Why

mrswats edited in Sat, 06 Aug 2022

Problem description

Take a picture from the web page and use it as the background image. After using it, it is found that it has been enlarged. When setting background- size:100% And then returned to normal. Why

code snippet

] at this time, the actual effect of the project after running:

clipboard.png

The background of the problem and what methods have you tried

When using background - size : one hundred % It's normal when it's time

Related codes

//Please paste the code text below (do not use pictures instead of codes)

What are your expectations? What is the actual error message?

I want to know the principle, why, it is reasonable to say that when no other attribute is set, background should be the default - The size is 100 % Ah, why do I need to set it alone

2 Replies
joshinator414
commented on Sat, 06 Aug 2022

The default is auto

AIdrick
commented on Sat, 06 Aug 2022

https :// developer . mozilla . org ... The initial value auto scales the background image to the scale of the background image.

lock This question has been locked and the reply function has been disabled.