在css中,可以使用background-image:url(图片地址),url(图片地址);来让两个背景图片重合显示。
这样,当你有了将两个图形混合成美丽的东西的想法时,可以得到一个不错的结果。
示例:
<!doctype html> <html> <head> <meta charset="utf-8"> <style type="text/css"> body { background-image: url(https://image.flaticon.com/icons/svg/748/748122.svg), url(https://images.unsplash.com/photo-1478719059408-592965723cbc?ixlib=rb-1.2.1&auto=format&fit=crop&w=2212&q=80); background-position: center, top; background-repeat: repeat, no-repeat; background-size: contain, cover; } </style> </head> <body> <!-- Your content here --> </body> </html>
效果图:
更多web前端知识,请查阅 HTML中文网 !!
以上就是css怎么让两个背景图片重合显示?的详细内容,更多请关注0133技术站其它相关文章!