Currently, I am utilizing CSS transitions to adjust the height of an input element from 40px to 0px in an attempt to make it disappear.
While this technique works effectively for images and yields a satisfactory result, it seems to fall short when applied to input elements.
For inputs, the element does not reach 0px in height and therefore fails to vanish.
I am interested in employing CSS transitions to achieve a gradual disappearance effect for input elements. Is this feasible?
To visualize what an input would look like with a height of 0px, refer to this fiddle:
https://jsfiddle.net/01geLwh7/
.search_bar_input {
box-sizing: border-box;
border-radius: 4px;
border-style: solid;
border-width: 1px;
border-color: #dddddd;
width: 140px;
background-color: rgba(255, 255, 255, 0);
margin: 0 auto;
position: relative;
top: 6px;
}
#search_bar_input_show {
height: 40px;
}
#search_bar_input_hide {
height: 0px;
}
<input class="search_bar_input" id="search_bar_input_hide" name="search" type="text" placeholder=" Search" />