Questo è un argomento html/css, non php.

Guardati questo, dovrebbe essere quello che cerchi: https://codepen.io/dudleystorey/pen/PZyMrd