CCS3:
#wrapper {
position: relative;
width: 660px;
max-width: 70%;
background: #ccc;
padding: 30px;
margin: 0 auto;
border-radius: 4px 4px 4px 4px;
text-align: center;
}
.fade {
opacity: 1;
transition: opacity .25s ease-in-out;
-moz-transition: opacity .25s ease-in-out;
-webkit-transition: opacity .25s ease-in-out;
}
.fade:hover {
opacity: 0.5;
}
html:
<div class="fade">
<div id="wrapper">
BLAH<BR>
BLAH<BR>
BLAH<BR>
</div>
</div>
正如您在 jsfiddle 中看到的那样,由于某种原因,当您将光标悬停在框外时它会逐渐消失......我认为它与宽度有关,有什么想法吗?