Css for file input

by Simon Hi

HTML

<label><input type="file">Choisir un avatar</label>

CSS

body {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100vh;
	background:cyan;
	box-sizing:border-box;
	margin:0;
	padding:0;
}

label {
  display: flex;
  position: relative;
  width: max-content;
  border-radius: 50%;
  border: 5px solid red;
  color: red;
  background: yellow;
  width: 80vmin;
  height: 80vmin;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-family: sans-serif;
  font-size: 16vmin;
  cursor: pointer;
}

input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 0.01%;
  height: 0.01%;
  z-index: -1;
}