我有一个图像,我想在其上放置其他图像。例如篮球场上的球员
使用 CSS 执行此操作的最佳方法是什么,我很想使用表格执行此操作,但担心可能有更好的解决方案
最佳答案
如果你使用 table ,我会阉割你:)
div 和 CSS 也是如此:
HTML:
<div id="bb-court">
<div id="player-1">
</div>
</div>
CSS:
#bb-court {
z-index:1;
}
#player-1 {
z-index:2;
background-image: url();
position: absolute;
margin: top right bottom left; /* All with reference to parent */
}
关于css - 使用 CSS 在图像上布局图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5284907/