Answer the question
In order to leave comments, you need to log in
Is it possible to do it with css or svg?
Is it possible to make a 4-delimited horizontal line using CSS or SVG, dividing this line into 5 equal parts?
It is necessary to make exactly one line of 1 block, divided into 5 parts, and not one line of 5 blocks, because. the width of this line is loaded from the JS script:
graphic[i].style.width = graphic[i].innerHTML * 20 + '%';
graphic[i].innerHTML
- has values from 1-5 (score), including decimals. Answer the question
In order to leave comments, you need to log in
You can wrap the block in the parent, and add decorative stripes to it through pseudo-elements.
https://codepen.io/just_freelance/pen/bGdMeWg
Well, if the current is one block, you can hang this line on the background (as a picture) and specify the width of the background.
Well, the width of the parent is equal to the width of the background, and the block itself is already a percentage.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question