The present invention is a device for use by infants or pets which provides a fence for use by infants or pets to confine their activities within a restricted area so that caring of the infants or pets can become easier. The present invention comprises an assembly of fence plates rotatable in relation to each other, wherein the adjacent fence plates are assembled with each other by means of a rotating axle. The fence has a bottom portion which is disposed with fixing members. The present invention assembles a plurality of the fence plates to form a fence. The fence is fixed on the ground by the fixing members to prevent it from sliding. When infants or pets are put into an area restricted by the fence, they can enjoy sufficient rooms for activities. It is also possible to prevent the infants or pets from escaping out of the fence and to confine their activities within a restricted area, thus accidents due to absence of care could be avoided.