Campus slang from Hong Kong/Taiwan that spread on the mainland in the 2000s. Female counterpart: 班花 (bānhuā, 'class flower'). Higher levels: 校草 (xiàocǎo, school heartthrob), 系草 (xìcǎo, faculty heartthrob).
memory
班 (class) + 草 (grass) — but here 草 is short for 草花儿 / a 'plant' metaphor for a guy. Pair: 草 (boy) vs 花 (girl).