Just gravity Dave, but the lids are a close fit and rub the sides a bit. Enough friction to keep them closed if inverted.
May you have the day you deserve!