knockout实现卡片引用边缘动画效果代码

代码语言:html

所属分类:其他

代码描述:knockout实现卡片引用边缘动画效果代码

代码标签: knockout 卡片 引用 边缘 动画

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

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

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

  
  
<style>
@import url("https://fonts.googleapis.com/css2?family=Lato:wght@400&display=swap");
* {
  box-sizing: border-box;
  margin: auto;
}

body {
  position: relative;
  height: 100vh;
  display: flex;
  flex-wrap: wrap;
  background: #444654;
  font-family: Lato;
  perspective: 1440px;
}

#testimonials {
  width: 100%;
  height: 100%;
}
#testimonials .container {
  width: 100%;
  height: 100%;
  padding: 0 11vw;
  display: flex;
  flex-wrap: wrap;
}
#testimonials .container .struct {
  width: 50%;
  min-width: 400px;
  aspect-ratio: 2/1;
  padding: 40px;
}
#testimonials .container .struct.full {
  width: 100%;
}
#testimonials .container .struct:nth-of-type(2n) .frame svg {
  transform: rotateY(180deg);
}
#testimonials .container .struct:nth-of-type(2n) .frame .img {
  left: 100%;
}
#testimonials .container .frame {
  position: relative;
  padding: 40px;
  min-height: 100%;
  transition: transform 0.3s ease;
}
#testimonials .container .frame:hover {
  transform: scale(1.12);
}
#testimonials .container .frame:hover .bg {
  transform: scale(1.1, 1.15);
}
#testimonials .container .frame:hover svg rect {
  animation: none;
  stroke-dashoffset: 0;
}
#testimonials .container .frame .bg {
  --conic: null;
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  border-radius: 20px;
  z-index: -2;
  overflow: hidden;
  transition: transform 0.3s ease;
}
#testimonials .container .frame .bg::before {
  content: "";
  position: absolute;
  width: 150%;
  height: 150%;
  left: -25%;
  top: -25%;
  background: conic-gradient(var(--conic));
  filter: blur(150px);
  animation: spin 1s linear infinite;
}
#testimonials .container .frame .img {
  position: absolute;
  width: 15%;
  max-width: 80px;
  aspect-ratio: 1;
  top: 0;
  left: 0;
  display: flex;
  background-color: #75a99c;
  background-position: center;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
#testimonials .container .frame .img span {
  font-size: 200%;
  color: #f0f0f0;
  text-shadow: 0 0 5px #0f0f0f;
}
#testimonials .container .frame svg {
  position: absolute;
  width: 110%;
  height: 110%;
  top: -5%;
  left: -5%;
  z-index: -1;
}
#testim.........完整代码请登录后点击上方下载按钮下载查看

网友评论0