Reputation:
i need of add overlay opacity 0.5 up on
<div class="panel panel-default">
</div>
div has the css
.panel.panel-default {
border-top-color: #F5F5F5;
border-top-width: 1px;
}
.panel {
float: left;
width: 100%;
border: 0px;
border-top: 2px solid #E5E5E5;
margin-bottom: 20px;
position: relative;
-moz-box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.2);
-webkit-box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.2);
box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.2);
}
.panel-default {
border-color: #ddd;
}
.panel {
margin-bottom: 20px;
background-color: #fff;
border: 1px solid transparent;
/* border-radius: 4px; */
-webkit-box-shadow: 0 1px 1px rgba(0,0,0,.05);
box-shadow: 0 1px 1px rgba(0,0,0,.05);
}
html * {
outline: none !important;
}
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
user agent stylesheetdiv {
display: block;
}
Now I would like the div with opacity above 0.5, and the center of this opaque div I enter 4 buttons at the center vertically and horizontally
so I have to insert a new div to the opacity and another div for 4 buttons central,
<div class="panel panel-default">
<div style="overlay"><div style="bottons">1</div><div style="bottons">2</div><div style="bottons">3</div><div style="bottons">4</div></div>
</div>
http://jsfiddle.net/qu62mvkk/10/
http://jsfiddle.net/qu62mvkk/13/
Upvotes: 0
Views: 119
Reputation: 1323
Do not use opacity because all children elements will inherit this, use background-color RGBA instead. eg:
background-color: rgba(255,255,255,0.5),
this will make only your selected div with opacity.
Upvotes: 1