2017-05-07 43 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