vendredi 8 mai 2015

How to do transparent background on few div to see background of parent

I have the following CSS code:

#wrapper{
    height:500px;
    background: url('http://ift.tt/1cv6JwS');
}
#menu:before{
    width:500px;
    height:60px;
    background: rgba(255,255,255,0.6);
    content: "";
    position: fixed;
    top:0;
    left: 0;
    border-radius: 0 0 10px 0;
}
#menu{
    position: fixed;
    top:60px;
    left: 0;
    background: rgba(255,255,255,0.6);
    height: 300px;
    width: 60px;
    border-radius: 0 0 10px 0;
}
#circle{
    position: fixed;
    width:150px;
    height:150px;
    border-radius: 150px;
    background: #000;
    top: 10px;
    left: 10px;
}
#circle2{
    position: fixed;
    width:120px;
    height:120px;
    border-radius: 120px;
    background: #fff;
    top: 25px;
    left: 25px;
}
#circle3{
    position: fixed;
    width:90px;
    height:90px;
    border-radius: 90px;
    background: #000;
    top: 40px;
    left: 40px;
}

#circle4{
    position: fixed;
    top: 54px;
    left: 54px;
}
.btn{
    border: none;
    display: block;
    margin: 1px;
    background: #fff;
    width:60px;
    height: 30px;    
    font-weight: 700;
    font-size: 17px;
}
#plus{
    border-radius: 30px 30px 0 0;
}
#minus{
    border-radius: 0 0 30px 30px;
}

And following HTML code:

<div id="wrapper">
    <div id="menu"></div>
    <div id="circle">
        <div id="circle2">
            <div id="circle3">
                <div id="circle4">
                    <button id="plus" class="btn">+</button>
                    <button id="minus" class="btn">-</button>                    
                </div>
            </div>
        </div>
    </div>
</div>

Could you help me to understand how I can achieve solution, which will make "transparent" black circles and I could see only image? If I make now this black color as - background: rgba(0,0,0,0). I can see "menu" bars and I'd like to not see them.

There's following link with example: http://ift.tt/1EnTdRz

Aucun commentaire:

Enregistrer un commentaire