How can I overlay multiple images using HTML/CSS or JavaScript, without using position:absolute?

╄→尐↘猪︶ㄣ 提交于 2019-12-04 19:19:58

If you can't position it absolute I think the only solution are multiple backgrounds (CSS3):

https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Using_multiple_backgrounds

http://www.css3.info/preview/multiple-backgrounds/

The problem comes when you need to add or remove specific backgrounds... you'll need specifically created functions to add backgrounds and remove them from the layer.

BTW, I recommend you trying to move them to an absolute position, as it will be easier than using multiple backgrounds.

Remember that you can use position: absolute inside a relative-positioned div, so the absolute positioning will be relative to the relative-positioned one.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!