Html 为什么部分图像被隐藏

Html 为什么部分图像被隐藏,html,css,Html,Css,看一看 在你点击一块瓷砖后,一个房子的精灵应该会附着到这个瓷砖上,并完全显示出来。图像需要跨越多个瓷砖,但是精灵被相邻瓷砖覆盖。为什么呢 .div { background: none repeat scroll 0 0 red; display: inline-block; height: 20px; width: 20px; vertical-align:top; transition: all 500ms ease-in-out; c

看一看

在你点击一块瓷砖后,一个房子的精灵应该会附着到这个瓷砖上,并完全显示出来。图像需要跨越多个瓷砖,但是精灵被相邻瓷砖覆盖。为什么呢

.div {
    background: none repeat scroll 0 0 red;
    display: inline-block;
    height: 20px;
    width: 20px;
    vertical-align:top;
    transition: all 500ms ease-in-out;
    cursor: url(house.png) 1 20, pointer;
}
这应该起作用:

.div img {
    position : absolute;
}
这应该起作用:

.div img {
    position : absolute;
}

这是因为瓷砖的尺寸是20x20px-这比你的PNG小-这是因为瓷砖的尺寸是20x20px-这比你的PNG小-它被右边和下面的div的背景所覆盖-这是如何解决的?它被右边和下面的div的背景所覆盖-这是如何解决的解决了吗?但我希望图像跨越几块瓷砖,而不仅仅是那一块。给图像
位置:绝对
thenGenius,这也可以通过溢出实现吗?这不是溢出问题,因为我看不到
overflow:hidden
thenGenius,这也可以通过溢出实现吗?这不是溢出问题,因为我看不到
overflow:hidden