回答編集履歴
1
chousei
test
CHANGED
@@ -32,18 +32,5 @@
|
|
32
32
|
background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="30" width="30"><circle cx="15" cy="15" r="15" fill="red" /></svg>') no-repeat 0 0;
|
33
33
|
}
|
34
34
|
</style>
|
35
|
-
<script>
|
36
|
-
window.addEventListener('DOMContentLoaded', ()=>{
|
37
|
-
const offset=10;
|
38
|
-
const handle=30;
|
39
|
-
aaa.style.left=offset+handle;
|
40
|
-
r.addEventListener('input',()=>{
|
41
|
-
const w=r.offsetWidth;
|
42
|
-
const p=r.value;
|
43
|
-
const max=r.max;
|
44
|
-
aaa.style.left=`${(w-handle)*p/max+offset+handle}px`;
|
45
|
-
});
|
46
|
-
});
|
47
|
-
</script>
|
48
35
|
<input type="range" value="0" step="1" max="100" min="0">
|
49
36
|
```
|