250x250
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- button
- keyframes
- 애니메이션
- 개발자
- 비전공자
- ipad
- css3
- xcode
- MAC
- jQuery
- front-end
- 풀스택
- react
- image
- javascript
- 프론트엔드
- effect
- SWIFT
- iPhone
- IOS
- html5
- CSS
- 비전공 개발자
- 자바스크립트
- iOS 개발자
- Animation
- php
- HTML
- 백엔드
- hover
Archives
- Today
- Total
비전공자 개발일기
Neumorphism Custom Range Slider 본문
728x90
SMALL
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>NEUMORPHISM CUSTOM RANGE SLIDER</title>
<link rel="stylesheet" href="style.css">
<script defer src="main.js"></script>
</head>
<body>
<div class="box">
<input type="range" class="range" value="0" min="0" max="100">
<div id="rangeValue">0</div>
</div>
</body>
</html>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: #EDF1F4;
}
.box {
position: relative;
display: flex;
justify-content: center;
align-items: center;
padding: 20px;
background: linear-gradient(to bottom, rgba(0, 0, 0, .05), #EDF1F4);
border-radius: 40px;
box-shadow: 15px 15px 20px rgba(0, 0, 0, .1), -15px 15px 20px #FFF;
}
.range {
width: 400px;
height: 15px;
appearance: none;
background-color: #EDF1F4;
outline: none;
border-radius: 15px;
box-shadow: 5px 5px 5px rgba(0, 0, 0, .1), -5px -5px 10px #FFF, inset 5px 5px 5px rgba(0, 0, 0, .1);
overflow: hidden;
}
.range::-webkit-slider-thumb {
appearance: none;
width: 15px;
height: 15px;
background: #FFF;
border-radius: 50%;
border: 2px solid #0074CF;
box-shadow: -407px 0 0 400px #27A0FF;
cursor: pointer;
}
#rangeValue {
position: relative;
text-align: center;
width: 60px;
font-size: 1.25em;
font-weight: 500;
color: #FFF;
background-color: #27A0FF;
margin-left: 15px;
border-radius: 25px;
box-shadow: 5px 5px 10px rgba(0, 0, 0, .1), -5px -5px 10px #FFF, inset 5px 5px 10px rgba(0, 0, 0, .1), inset -5px -5px 5px rgba(255, 255, 255, .25);
}
let range = document.querySelector(".range");
range.addEventListener("mousemove", rangeSlider);
function rangeSlider() {
let rangeval = range.value;
document.getElementById("rangeValue").innerHTML = rangeval;
}
728x90
LIST
'HTML _CSS' 카테고리의 다른 글
Sidebar Menu (0) | 2022.08.04 |
---|---|
Firework (0) | 2022.08.01 |
WhatsApp LOGO (0) | 2022.07.29 |
Bubble Animation (0) | 2022.07.28 |
Magic LIne Icon Hover Effects (0) | 2022.07.26 |