2

请使用 Internet Explorer 查看以下链接

http://mojogobbles.com.sg/cupcake-menu/

似乎当我尝试将鼠标悬停在已声明的 div 类上时,:hover它不能正常工作,但在 chrome 中它工作得很好。知道为什么吗?

请仅使用 CSS 解决方案!

这是CSS编码

#f12{
    width: 400px;
    height: 30px;
    left: 470px;
    top: 1090px;
    position: absolute;
    background: transparent;
    opacity: 1;
    filter: alpha(opacity=0);
    float: left;
    border-width: 1px;
    border-style: inset;
    z-index: 99999;
}

#f12:hover ~ #floater{
    background:url(images/flavours/f12.jpg);
    width: 320px;
    height: 320px;
    opacity: 100;
    top: 30%;
    left: 0%;
    filter: alpha(opacity=100);
    float: left;
    position: fixed;
}

#f13{
    width: 100px;
    height: 50px;
    left: 550px;
    top: 460px;
    position: absolute;
    background: transparent;
    opacity: 1;
    filter: alpha(opacity=0);
    float: left;
    -webkit-transition: 1s all;
    -moz-transition: 1s all;
    transition: 1s all;
    border-width: 1px;
    border-style: inset;
}

#f13:hover ~ #floater{
    background: url(images/flavours/f12.jpg);
    opacity: 100;
}

#floater{
    width: 320px;
    height:320px;
    opacity: 0;
    position: fixed;
    left: 0;
    top: 30%;
    filter: alpha(opacity=0);
    float: left;
    -webkit-transition: 0.5s ease-in-out;
    -moz-transition: 0.5s ease-in-out;
    -ms-transition: 0.5s ease-in-out;
    transition: 0.5s ease-in-out;
    border-width: 1px;
    border-style: inset;
    filter: alpha(opacity=100);
}
4

1 回答 1

2

您有两种 doctype,第一种是错误的将 IE 置于 quirks 模式。只需删除它们并使用这个:<!DOCTYPE html>

于 2012-09-26T14:18:31.333 回答