Here are some slides showing the behavior of a balloon filled with carbon dioxide exposed to liquid nitrogen.

The green (Bat Man) balloon contains carbon dioxide gas. (The woman in the video is Nancy Gettys who worked with me in the early 90's teaching a chemistry course.)

Here Nancy is placing the balloon in an evaporating dish with some liquid nitrogen which she has poured from the dewar near her left hand.

As you can see the volume of the balloon containing the carbon dioxide is getting smaller.

Here the volume of the carbon dioxide gas in the balloon is effectively zero. All of the carbon dioxide gas has formed a solid, so now the balloon contains only solid carbon dioxide.

Now the balloon has been removed from the liquid nitrogen and the carbon dioxide in the balloon is warming up.

Here the balloon and the carbon dioxide is warmed even more. Notice the volume of the balloon is increasing. As the carbon dioxide solid warms it sublimes, that is, it changes from the solid state to the gaseous state directly. It turns out the liquid state for carbon dioxide does not exist under normal atmospheric presure conditions.

Finally the balloon has returned to its initial volume, all of the carbon dioxide has returned to the gas phase.