Most of them had rubber linings, some that when they came in contact with the gas itself swelled up. The point was the bullet would puncture the tank, the tank would leak out, the rubber lining would swell up and cut off the leak (or minimize it). Some just had rubber as a way of deflecting the slower bullets (ones that expended their energy punching through the wing or the fuselage already) or flak shrapnel.
they wouldn't swell and shrink per se, not like balloons or anything.