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

h5开发总结 #4

Open
fozero opened this issue Jul 13, 2018 · 0 comments
Open

h5开发总结 #4

fozero opened this issue Jul 13, 2018 · 0 comments

Comments

@fozero
Copy link
Owner

fozero commented Jul 13, 2018

解决图片变形的问题

一般设计给我们的图都特别的大,假如一个banner我们设置width为100%时,那么在低分辨率的电脑上显示就会变形,
可以通过background-size设置cover或者contain值来裁剪,这样就不会造成图片变形了,当然还有其他办法,比如响应式设置媒体查询,但这样无疑增加了工作量,还是比较麻烦

图片如何切图及布局

如果一个body的背景被它的子类的一个背景覆盖了,层级可能是背景在上面 。可以通过单独设置这两个背景为绝对定位,然后设置他们的z-index属性就能解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant