Block copolymers self-assemble into a variety of ordered structures in nanometer scale as a result of microphase separation. Such nanostructures can be utilized as a template for nanometer scale porous structures. We have succeeded in fabricating nano-scale pores or foams by introducing supercritical carbon dioxide into particular domains of block copolymers. Fluorine containing polymer has affinity toward carbon dioxide and hence fluorine containing block copolymers work ideal template for this technique. Spherical, cylindrical, planar and bicontineous porous sturctures have been fabricated by this technique. We further observed order-order transition of block copolymers while swelling in carbon dioxide by in-situ small angle X-ray scattering, and thus the resulted porous structures are not always similar to the original morphologies of block copolymers.