css - Can I insert background-size: cover into the background shorthand? -


i had this:

background-size: cover; background-position: 50% 50%; background-repeat: no-repeat; 

i folded position , repeat background, end results causes background-size property overriden:

background-size: cover; background: no-repeat 50% 50%; 

is possible folder background-size: cover shorthand? attempted background: no-repeat cover 50% 50% that's invalid.

i don't think can include background-size in shorthand there should no issue including after shorthand statement.

edit: answer confirms can.

background: no-repeat 50% 50% etc; background-size: cover; 

the shorthand statement overrides all background statements, ones haven't been included (or can't included) in shorthand statement.


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -