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

[css] 第133天 如何使用css3实现一个div设置多张背景图片? #1117

Open
haizhilin2013 opened this issue Aug 26, 2019 · 2 comments
Labels
css css

Comments

@haizhilin2013
Copy link
Collaborator

第133天 如何使用css3实现一个div设置多张背景图片?

@haizhilin2013 haizhilin2013 added the css css label Aug 26, 2019
@qhdxwdm
Copy link

qhdxwdm commented Aug 26, 2019

background-image:url("1.jpg"),url("2.jpg"),url("3.jpg");
background-repeat: no-repeat, no-repeat, no-repeat;
background-position: 0 0, 200px 0, 400px 201px;

@Konata9
Copy link

Konata9 commented Sep 14, 2019

在 CSS3 中,只要在 background 中按顺序添加 url 就可以实现多张背景图片。每一个图片用 , 分开即可。
需要注意的就是浏览器的兼容问题。

示例地址:https://codepen.io/Konata9/pen/PoYBPLY

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

No branches or pull requests

3 participants