set opacity: 0 instead of display: none