Opposite can be used as a preposition of place. It is used to talk about something that is facing an object that is across from it. Often it separated by a linear-type object like a road or a river. ex. They live in the house opposite ours. We often wave at them across the street.
Prepositions of place are found just in front of the place word or phrase.
preposition of place + place word or phrase
ex. opposite the park
in front of across from