开关切换动画效果

代码语言:html

所属分类:表单美化

代码描述:开关切换动画效果

代码标签: 效果

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

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

<style>
body {
  display: flex;
  justify-content: center;
  overflow: hidden;
}
body .content {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 100px;
  position: absolute;
  top: 25%;
}
body p {
  padding: 15px;
  font-size: 24px;
}
body #normal {
  font-family: "Playfair Display", serif;
}
body #gangnam {
  font-family: "Bangers", cursive;
  font-size: 27px;
  padding-top: 20px;
  background: -webkit-linear-gradient(45deg, #53d9d1, #f27b9b, #eb7132);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
body .switch {
  position: relative;
  display: inline-block;
  height: 40px;
  width: 80px;
}
body .switch input {
  opacity: 0;
  height: 0;
  width: 0;
}
body .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  -webkit-transition: 0.4s;
  transition: 0.4s;
}
body .slider:before {
  position: absolute;
  content: "";
  height: 30px;
  width:.........完整代码请登录后点击上方下载按钮下载查看

网友评论0