I want to make a button like this
I want to know how to add a background image without blocking the text and icon above.
App.js
import "./styles.css";
import CloudUploadOutlinedIcon from "@material-ui/icons/CloudUploadOutlined";
export default function App() {
return (
<div className="App">
<div
className="photo__wrapper__img"
>
<div className="__photo__wrapper__img__label-container">
<div>
<CloudUploadOutlinedIcon style={{ color: "white" }} />
</div>
<span>Click here to change photo</span>
</div>
</div>
</div>
);
}
styles.css
.App {
font-family: sans-serif;
text-align: center;
}
.photo__wrapper__img {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin: auto;
width: 150px;
height: 150px;
border-radius: 50%;
background-color: rgba(60, 67, 74, 0.5);
background-repeat: no-repeat;
background-position: center;
background-size: cover;
}
.photo__wrapper__img .photo__wrapper__img__label-container {
text-align: center;
}
CodeSandbox
https://codesandbox.io/s/loving-volhard-747zr?file=/src/App.js