How about this instead:

kbRow.classList.add('row' + nrow);

That way you get classnames 'row0', 'row1', 'row2' and 'row3'.  (And it works even if there are more than 4 rows).  That way the classnames are a little more self-documenting, too.  Its weird in the CSS to have classes that are just numbers.  And you simplify the JS a lot.