mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:48:12 +00:00
LibWeb: Add basic input range rendering
This commit is contained in:
parent
d28c400fcb
commit
0f37e0ee89
7 changed files with 169 additions and 3 deletions
68
Base/res/html/misc/input-range.html
Normal file
68
Base/res/html/misc/input-range.html
Normal file
|
@ -0,0 +1,68 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Input range showcase</title>
|
||||
<style>
|
||||
input[type=range] {
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.fancy {
|
||||
-webkit-appearance: none;
|
||||
margin: 18px 0;
|
||||
}
|
||||
|
||||
.fancy:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.fancy::-webkit-slider-runnable-track {
|
||||
width: 100%;
|
||||
height: 8.4px;
|
||||
cursor: drag;
|
||||
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
|
||||
background: #3071a9;
|
||||
border-radius: 1.3px;
|
||||
border: 0.2px solid #010101;
|
||||
}
|
||||
|
||||
.fancy::-webkit-slider-thumb {
|
||||
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
|
||||
border: 1px solid #000000;
|
||||
height: 36px;
|
||||
width: 16px;
|
||||
border-radius: 3px;
|
||||
background: #ffffff;
|
||||
cursor: pointer;
|
||||
-webkit-appearance: none;
|
||||
margin-top: -14px;
|
||||
}
|
||||
|
||||
.fancy:focus::-webkit-slider-runnable-track {
|
||||
background: #367ebd;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Input range showcase</h1>
|
||||
<p>
|
||||
<input type="range" oninput="document.getElementById('a-value').textContent = this.value">
|
||||
Value: <span id="a-value">?</span>
|
||||
</p>
|
||||
<p>
|
||||
<input type="range" value="0" class="fancy" oninput="document.getElementById('b-value').textContent = this.value">
|
||||
Value: <span id="b-value">?</span>
|
||||
</p>
|
||||
<p>
|
||||
<input type="range" min="10" value="11" max="15" oninput="document.getElementById('c-value').textContent = this.value">
|
||||
Value: <span id="c-value">?</span>
|
||||
</p>
|
||||
<p>
|
||||
<input type="range" class="fancy" min="50" max="200" step="5"
|
||||
oninput="document.getElementById('d-value').textContent = this.value">
|
||||
Value: <span id="d-value">?</span>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue