我是一个三天的初学者,享受CSS的每一分钟,以及与web开发相关的一切.
我试图使div中的文本在悬停状态下随它一起展开.
提前谢谢你.
以下是JSFIDLE:
.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>