【问题标题】:Image disappears when hovering then appears - CSS悬停时图像消失然后出现 - CSS
【发布时间】:2014-04-09 23:55:46
【问题描述】:

我的网页上有一张图片就是这张图片

当我将鼠标悬停在图像上时,它应该转向这个,

它会这样做,但是当我将鼠标悬停时它会消失,然后大约 2 秒后会出现第二张图像。我怎样才能让它立即出现?是因为我的网速可能很慢吗?

这是我的 CSS,

#right_slide_arrow{
    width:150px;
    height:150px;
    float:left;
    margin-top:140px;
    background:url(../images/right_arrow.png) no-repeat;
}
#right_slide_arrow:hover {
    cursor:pointer;
    background:url(../images/right_arrow_hover.png) no-repeat;
}

【问题讨论】:

    标签: html css image


    【解决方案1】:

    图像在使用之前不会加载;充其量,这会导致它闪烁。

    最好使用image sprite

    【讨论】:

    • 好答案,也许可以详细说明一下图像精灵?
    猜你喜欢
    • 2015-11-14
    • 2013-12-24
    • 2012-03-03
    • 2012-08-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多