ImageInput { position: relative width: 200px; padding: 5px; background: white; box-shadow: 0 0 10px #AAA; transition: box-shadow 0.2s img { width: 100% background-image: linear-gradient(172deg, rgb(247, 247, 247), rgba(0,0,0,0)) } input { cursor: pointer opacity: 0 position: absolute width: 100% height: 100% top: 0 left: 0 } span { position: absolute left: 0 right: 0 bottom: 0 margin: 20px background: #444 padding: 4px 8px border-radius: 5px transition: opacity 0.2s opacity: 0.5 color: white } :hover { box-shadow: 0 0 10px #393939; span { opacity: 1 } } }