Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

背景图片的设置 #5

Open
yurensmile opened this issue Apr 10, 2019 · 2 comments
Open

背景图片的设置 #5

yurensmile opened this issue Apr 10, 2019 · 2 comments
Labels

Comments

@yurensmile
Copy link
Owner

yurensmile commented Apr 10, 2019

background-position: center | top | bottom | left | right;
//top|bottom是指定y方向位置的,left|right是指定x方向位置的,当只设定一个值时,另一个值自动为50%,同样background-position也可以接受两个值,第一个值指定x方向偏移的位置,第二个值指定y方向偏移的位置。
background-size: contain | cover
//指定背景图片的大小,当至指定一个值的时候,其宽高比默认是不会被改变的(也就是说另一个值是auto)
@yurensmile
Copy link
Owner Author

yurensmile commented Apr 12, 2019

note: img 是没有基线的

@yurensmile
Copy link
Owner Author

当只指定一个值的时候,图像的宽高比是不会变化的,这个设定是很符合常理的。

@yurensmile yurensmile added the css label Apr 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant