Hide info/success box after a certain amount of time or let users to be able to close the box?

Is there a way to get the info/success boxes automatically closed after a certain amount of time?