In this paper, we generalize Sierpinski carpet and Menger sponge in n-dimensional space, by using the generations and characterizations of affinely-equivalent Sierpinski carpet and Menger sponge. Exactly, Menger sponge in 4-dimensional space could be drawn out clearly under an affine transformation. Furthermore, the method could be used to a much broader class in fractals.