I'm a 3-day beginner enjoying every minute of CSS and everything web development related.
I'm trying to make the text inside the div expand along with it on hover. Not sure as to how to keep the text centered and make it expand when the div expands.
Thank you in advance.
Here's the jsfiddle: https://jsfiddle.net/28dozgcw/
.circle+.container {
height: 15em;
width: 15em;
background-color: skyblue;
background-size: 200%;
background-repeat: no-repeat;
background-position: center;
border: 1rem transparent;
border-radius: 50%;
opacity: 35%;
margin: 0% 50%;
display: flex;
align-items: center;
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
.circle+.container:hover {
opacity: 100%;
height: 25em;
width: 25em;
transition: 1s;
}
h1 {
position: center;
font-size: 2rem;
color: white;
}
<div class="circle">
</div>
<div class="container">
<h1> Lorem Ipsum </h1>
</div>