div+css布局实现逼真的拉杆开关效果代码

代码语言:html

所属分类:布局界面

代码描述:div+css布局实现逼真的拉杆开关效果代码

代码标签: div css 布局 实现 逼真 拉杆 开关

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

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

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

  
  
<style>
:root {
	--bg: hsl(60, 1%, 84%);
	--gradient-start: hsl(40, 8%, 64%);
	--ease: linear(
    0, 0.0036 9.62%, 0.0185 16.66%,
    0.0489 23.03%, 0.0962 28.86%,
    0.1705 34.93%, 0.269 40.66%,
    0.3867 45.89%, 0.5833 52.95%,
    0.683 57.05%, 0.7829 62.14%,
    0.8621 67.46%, 0.8991 70.68%,
    0.9299 74.03%, 0.9545 77.52%,
    0.9735 81.21%, 0.9865 85%,
    0.9949 89.15%, 1
  );
}

*,
*:after,
*:before {
	box-sizing: border-box;
}

img {
	position: fixed;
	top: 50%;
	left: 50%;
	translate: -100% calc(-50% + 10px);
	z-index: 2;
}

body {
	display: grid;
	place-items: center;
	justify-content: center;
	grid-template-columns: 150px 150px;
	min-height: 100vh;
	background: var(--bg);
	font-family:  "SF Pro Text", "SF Pro Icons", "AOS Icons", "Helvetica Neue", Helvetica, Arial, sans-serif, system-ui;
}

.sr-only {
	position:.........完整代码请登录后点击上方下载按钮下载查看

网友评论0