You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cover tells the browser to make sure the image always covers the entire container, even if it has to stretch the image or cut a little bit off one of the edges. contain, on the other hand, says to always show the whole image, even if that leaves a little space to the sides or bottom.
The default keyword — auto — tells the browser to automatically calculate the size based on the actual size of the image and the aspect ratio.
You can give background-position up to four values in modern browsers
Percentages work a little differently. Get your math hats out: moving a background image by X% means it will align the X% point in the imagetothe X% point in the container. For example, 50% means it will align the middle of the image with the middle of the container. 100% means it will align the last pixel of the image with the last pixel of the container, and so on.
box-shadow
https://developer.mozilla.org/zh-CN/docs/Web/CSS/box-shadow
https://css-tricks.com/almanac/properties/b/box-shadow/
https://www.w3schools.com/cssref/css3_pr_box-shadow.asp
background
https://developer.mozilla.org/zh-CN/docs/Web/CSS/background
background-size
https://css-tricks.com/almanac/properties/b/background-size/
background-repeat
https://css-tricks.com/almanac/properties/b/background-repeat/
background-image
https://css-tricks.com/almanac/properties/b/background-image/
background-position
https://css-tricks.com/almanac/properties/b/background-position/
background-origin
https://css-tricks.com/almanac/properties/b/background-origin/
background-attachment
https://css-tricks.com/almanac/properties/b/background-attachment/
background-clip
background-clip
这个属性感觉跟background-origin
差不多,值也是一样。前者可以理解为背景的裁剪范围,后者是背景的显示范围。
The text was updated successfully, but these errors were encountered: