div+css实现中性拟态图标按钮开关进度条效果代码

代码语言:html

所属分类:布局界面

代码描述:div+css实现中性拟态图标按钮开关进度条效果代码

代码标签: div css 中性 拟态 图标 按钮 开关 进度条

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

<!DOCTYPE html>
<html lang="en" >
<head>
 
<meta charset="UTF-8">
 
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/all.5.11.2.css">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@600;700;800;900&display=swap" rel="stylesheet">
<style>
    @charset "UTF-8";
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
}

body {
  background-color: #ecf0f3;
}

.container {
  width: 90%;
  height: 100vh;
  margin: 0 auto;
  padding: 40px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  align-items: center;
}
.container > * {
  margin: 10%;
}

.button_main {
  width: 200px;
  height: 200px;
  border: none;
  position: relative;
  border-radius: 35px;
  color: rgba(78, 149, 185, 0.4);
  cursor: pointer;
  font-weight: 600;
  font-size: 48px;
  outline: none;
  text-transform: uppercase;
  background-color: #ecf0f3;
  box-shadow: 15px 15px 30px #d1d9e6, -15px -15px 30px #ffffff, inset 0px 0px 0px 0px #d1d9e6, inset 0px 0px 0px 0px #ffffff;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: all 0.3s cubic-bezier(0.79, 0.21, 0.06, 0.81);
}
.button_main::before {
  font-family: "Font Awesome 5 Free";
  font-weight: normal;
  line-height: 0;
  font-size: 100px;
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.button_main::after {
  font-family: "Font Awesome 5 Free";
  line-height: 0;
  font-weight: bold;
  font-size: 100px;
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  visibility: hidden;
}
.button_main:hover {
  color: rgba(78, 149, 185, 0.6);
}
.button_main.active {
  color: rgba(78, 149, 185, 0.8);
  box-shadow: 0px 0px 0px #d1d9e6, 0px 0px 0px #ffffff, inset 10px 10px 25px #d1d9e6, inset -10px -10px 25px.........完整代码请登录后点击上方下载按钮下载查看

网友评论0