range实现推石头上山黑夜白昼切换效果代码
代码语言:html
所属分类:其他
代码描述:range实现推石头上山黑夜白昼切换效果代码,鼠标点击拖动石头试试。
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url("https://fonts.cdnfonts.com/css/spartacus-2");
*,
*:before,
*:after {
box-sizing: border-box;
}
html,
body {
background: #222;
padding: 0;
margin: 0;
display: flex;
min-height: 100%;
width: 100%;
align-items: center;
justify-content: center;
}
.demo {
--sky: #010015;
position: relative;
height: 379px;
border-radius: 10px;
width: 100%;
max-width: 768px;
margin: auto;
overflow: hidden;
background: var(--sky);
transition: 0.3s background ease;
font-family: "", sans-serif;
user-select: none;
@media screen and (max-width: 768px) {
border-radius: 0;
}
}
input[type="range"] {
position: absolute;
left: 1%;
bottom: 10%;
-webkit-appearance: none;
background: transparent;
height: 0;
width: 80%;
min-width: 300px;
rotate: -90deg;
transform-origin: left top;
z-index: 5;
@media screen and (ma.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0