html - Hide element behind transparent div -
i make next animation: logo should reveal div moving down. div has transparent background.
it possible hide overlaying part of logo behind transparent div?
<div class="transparent">some content</div> <div class="logo"></div> .transparent { position: relative } .logo { position: absolute }
i doubt if clip or mask behind transparent element.
so, perhaps need rethink "hiding behind" part , consider other options.
perhaps animating height:
* { padding: 0; margin: 0; } .transparent { height: 2em; line-height: 2em; border-bottom: 1px solid grey; position: relative; } .logo { height: 0; background: orange; position: absolute; top: 100%; width: 100px; transition: height 0.5s ease; } .transparent:hover .logo { height: 25px; /* assuming height known */ }
<div class="transparent">some content <div class="logo"></div> </div>
Comments
Post a Comment