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 } 

enter image description here

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

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -