HTML实现2个图片叠在一起(HTML)

<td style="position:relative;">
    <img style="position:absolute; z-index:1;" width="150" height="200" src="" />
    <img style="position:absolute; top:60px; left:30px; z-index:2" width="95" height="125" src="" />
</td>

先position : relative; 相对定位。

图片设置成position : absolute; 绝对定位, z-index :1;设置图片叠加层次。

猜你喜欢

转载自blog.csdn.net/qq_23833037/article/details/80531741