Yes, leopards do live in rainforests. Rainforests provide these big cats with dense cover and an abundance of prey. While they are well-suited for life in rainforests, leopards can also be found in other forest types, such as cloud forests and temperate rainforests.
In rainforests, leopards tend to be smaller in size compared to those found in other habitats. This adaptation is thought to be related to the dense vegetation in rainforests, which requires them to be more agile and maneuverable.
If you're interested in learning more about leopards and other wildlife that inhabit rainforests, I'd recommend doing some research on the topics of biodiversity and conservation efforts.