html - Stacking absolute elements with transform -


i'm building form custom absolutely positioned dropdown. other input fields animated in using transform: translatey. can't dropdown stack on top of below input elements. i've simplified problem following:

html:

<div class="a"></div> <div class="a top">     <div class="b"></div> </div> <div class="a"></div> 

css:

.a {     transform: translatey(10px);     position: "relative";     background: red;     height: 50px;     margin-top: 10px;     z-index: 1;     opacity: 0.8; } .b {     position: "absolute";     top: 0;     height: 100px;     width:25px;     background: blue; } .input.top {     z-index: 10; }   

the following fiddle illustrates problem: https://jsfiddle.net/m817ffqy/1/

i've experimented transform-style: flat , setting translatez, i've not been able desired effect..

instead of:

position: "relative"; position: "absolute"; 

try:

position: relative; position: absolute; 

also, .input.top need either position: relative or position: absolute.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -