简体   繁体   中英

How to get circle hover effect

How can I achieve rounded hover effect like in the attached image (at the right bottom pic) 盘旋悬停效果

Here is the fiddle link

Here is the relevant css:

.box_details {
  float:left;
  width:200px;
  height:200px;
  margin-right:35px;
  background-color:#fff;

  border-radius:3px;
  box-shadow: 0px 6px 19px 16px rgba(239,242,245,1);
}

.box_details:hover {
background-color:#f4f6f8;
color:#939bc5;
}

You can make a circle that has a bigger width than its parent element and center it. Check the code snippet for a demonstration of this.

 .box_details { float: left; width: 200px; height: 200px; margin-right: 35px; background-color: #fff; display: block; position: relative; border-radius: 3px; box-shadow: 0px 6px 19px 16px rgba(239, 242, 245, 1); overflow: hidden; } .box_details:hover .circle { margin-top: 140px; transition-duration: 0.4s; } p { text-align: center; } .circle { position: absolute; width: 200%; height: 100px; left: 0; right: 0; margin: 0 auto; background: lightgrey; border-radius: 50%; margin-left: -50%; margin-top: 250px; transition-duration: 0.4s; } 
 <div class="box_details"> <div class="circle"> <p>Hi!</p> </div> </div> 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM