See the Pen Dynamic periodic table by Ferran Buireu (@fbuireu) on CodePen.