2017-05-07 82 views
-1

我正在嘗試做這樣的事情。 (http://prnt.sc/f58ksy) 但我不知道如何使這種玻璃效果,我試圖改變不透明度,但它沒有工作。我的代碼:如何製作玻璃效果?

 .Head { 
    position: absolute; 
    top:200px; 
    margin-left: 20%; 
    color:white; 
    background-color: #2acec3; 
    margin-left: 8%; 
    font-size: 400%; 
    font-family: Calibri,Candara,Segoe,Segoe UI,Optima,Arial,sans-serif; 
    opacity: 0.7; 
    display: block; 
} 

.ParaPlanes { 
    position: absolute; 
    top:220px; 
    margin-left: 20%; 
    color:white; 
    background-color: #2acec3; 
    margin-left: 8%; 
    font-size: 400%; 
    font-family: Calibri,Candara,Segoe,Segoe UI,Optima,Arial,sans-serif; 
    opacity: 0.7; 
    display: block; 
} 

我的結果:http://prntscr.com/f58njn

謝謝! :-)

回答

0

Opacity屬性改變它的透明度的子元素太... 嘗試 -

background-color:rgba(red, green, blue, opacity (decimal b/w 0 to 1)) 

示例 -

#justadiv { 
    background-color : rgba(24, 180, 140, 0.5); 
} 

RGB值必須大於0且小於更大比255. 謝謝!

+0

感謝您的支持。我嘗試了你的想法,它看起來像這樣:http://prntscr.com/f58r8a – MadCatz

+0

@MadCatz ...你需要完全刪除不透明屬性。 –

+0

http://prntscr.com/f58set它不起作用。 :-) – MadCatz