{
background-color: #d9e670;
filter:alpha(opacity=25);
opacity:0.25;
}
å’Œå¦ä¸€ä¸ªdiv:
#logo_image
{
background: url(../images/logo.png) no-repeat center 50%;
}
<div id="logo_area">
<div id="logo_image"></div>
</div>
当然,logo_image也是é€æ˜Žçš„。我能用é€æ˜Žå—把它弄æˆé€æ˜Žçš„å—?
ç”案 0 :(得分:1)
我ä¸è¿™ä¹ˆè®¤ä¸ºã€‚如果ä¸æ˜¯å®¹å™¨ï¼Œæˆ‘ä¸ç¡®å®šæ˜¯å¦å¯ä»¥å°†å®ƒå¸¦åˆ°100ï¼…é€æ˜Žã€‚
但是,您å¯ä»¥åšçš„是将其放在å—之外,例如:
<div id="logo_image"></div>
<div id="logo_area">
</div>
然åŽåœ¨å¾½æ ‡å›¾åƒå—ä¸Šæ·»åŠ ï¼š
#logo_area
{
position: absolute;
height: x;
width: y;
}
所以它应该ä½äºŽå¾½æ ‡åŒºåŸŸdiv的顶部,但ä¸æ˜¯å®ƒçš„一部分。您å¯èƒ½éœ€è¦è®¾ç½®å¾½æ ‡åŒºåŸŸçš„é«˜åº¦ï¼Œå› ä¸ºå¾½æ ‡å›¾åƒä¸ä¼šå¯¼è‡´å®ƒä¼¸å±•ã€‚