2021年3月25日星期四

How to only change the last digits color of a number?

As you know the data will be changeable. So, I would like to know how can I change the color of all last digits of a number only if there is a zero in the end or more. for Example: 0.50 will be 0.50. 10.00 = 10.00. 10,000.00 = 10,000.00. 100,050.00 = 100,050.00 and so on. Thanks and any help would be greatly appreciated.

.num{    color: black;    font-size: 22px;    font-family: sans-serif;  }
<div class="num">0.50</div>  <div class="num">10.00</div>  <div class="num">10,000.00</div>  <div class="num">100,050.00</div>
https://stackoverflow.com/questions/66811030/how-to-only-change-the-last-digits-color-of-a-number March 26, 2021 at 12:22PM

没有评论:

发表评论