div+css实现悬浮回弹的花哨的用户图像效果代码

代码语言:html

所属分类:布局界面

代码描述:div+css实现悬浮回弹的花哨的用户图像效果代码

代码标签: div css 悬浮 回弹 花哨 用户 图像

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  

  
  
<style>
@property --a {
  syntax: "<angle>";
  inherits: true;
  initial-value: 0deg;
}

.box {
  --r: 30px; /* control the rounded part*/
  --s: 80px; /* control the size of the cut and the image  */
  --a: 20deg; /* control the depth of the curvature */
  
  position: relative;
  z-index: 0;
  cursor: pointer;
  transition: .4s --a;
  color: #fff;
  font-family: system-ui,sans-serif;
  text-align: center;
  animation: --a .8s backwards cubic-bezier(0,.6,.6,1.5) .7s;
}
@keyframes --a {
  0% {--a: 90deg}
}
.box:hover {
  --a: 35deg;
}
.box img {
  height: calc(2*var(--s));
  aspect-ratio: 1;
  scale.........完整代码请登录后点击上方下载按钮下载查看

网友评论0