Have two images of round marks on top, gray and colored. Have the lime if
img
elements and change the
src
attribute with JavaScript:
Element.setAttribute() — Web APIs | MDN[
^].
For color bar inside a horizontal frame, you can use just а
div
with the style property
width
set by JavaScript:
myTrackbar.style.width = value;
Some of your elements overlap others; this is achieve by combining the CSS property
position: relative
and
position: absolute
, relative underneath, absolute on top:
position — CSS | MDN[
^].
It's a bit counter-intuitive:
absolute
is used for overlapping and is actually relative to the parent element, if it is styled as
relative
; this relative position and size is controlled by combination of style value
left
,
top
,
right
or
bottom
. It's easier to try and observer, than to explain.
Basically, that's all you need. Please try and ask some follow-up question is something doesn't work.
—SA