css实现悬浮刷卡交易动画

代码语言:html

所属分类:悬停

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


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">


<style>
@import url("https://fonts.googleapis.com/css?family=Lexend+Deca&display=swap");
:root {
  --background: #33837e;
  --left-side: #5de2a3;
  --card: #c7ffbc;
  --card-line: #80ea69;
  --button-color-3: #26850e;
  --button-color-2: #379e1f;
  --button-color-1: #56be3e;
  --post: #dddde0;
  --numbers: #838183;
  --numbers-2: #aaa9ab;
  --post-line: #757375;
  --post-line2: #545354;
  --dollar: #4b953b;
}

html {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  width: 100%;
  background: var(--background);
}

.container {
  background-color: #ffffff;
  display: flex;
  width: 460px;
  height: 120px;
  position: relative;
  border-radius: 6px;
  transition: 0.3s ease-in-out;
}
.container:before {
  width: 200vw;
  position: absolute;
  top: 0;
  left: -100vw;
  height: 100%;
  content: "";
}
.container:hover .........完整代码请登录后点击上方下载按钮下载查看

网友评论0