Answer the question
In order to leave comments, you need to log in
How to implement SVG shading based on the width of another element?
Good day!
There is a ready rating component for Joomla, there is the following html with SVG icons > https://codepen.io/ilya-vins/pen/povVgEw
As you can see, there is such an element
<span class="extravote-stars"> <span id="rating_163_1" class="current-rating" style="width:100%;"></span>
Answer the question
In order to leave comments, you need to log in
You just need to create a so-called sprite - a picture, different parts of which will be displayed as the background of the element, depending on the conditions. Look at the default PNG image that this plugin uses and make an SVG with the same proportions.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question