html - CSS class selectors not changing anything -


this question has answer here:

i'm having problems css. should set colour of div class (for countdown), colour of text isn't changing. i've tried numerous fixes, can't working. here relevant css:

.10seconds, .9seconds, .8seconds, .7seconds, .6seconds { color: #00b200 ;} .5seconds { color: #adff2f ;} .4seconds { color: #e5e500 ;} .3seconds { color: #ffa500 ;} .2seconds { color: #ff5719 ;} .1seconds { color: #ff0000;} 

and relevant html:

<div id='timer' class='10seconds'>10</div> 

#timer has no set rules in css file. full css here.

thanks in advance.

it's because class names begin number, not allowed in css. revert name , number, eg:

.sec5{    color: green;  }
<div class="sec5"> 5 sec </div>

look @ question explained css class names


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -