There are several airports close to Opatija, but you will first have to travel from the airport to Rijeka (see instructions below for each airport), and then from Rijeka to Opatija.
You can use public transport (bus no. 32) or take a taxi to get to Opatija from Rijeka. The bus no. 32 goes every 30 min from the centre of Rijeka and it should take you 30 min to get to Opatija. The bus fare is 5 EUR. The taxi fare from Rijeka to Opatija is approximately 10 EUR.
Zagreb is the capital of Croatia, located 160 km from Rijeka. Shuttle buses from Zagreb airport to the main bus station go every 30 minutes. It will take you about 20 minutes to the bus station and another 2 hours by bus to Rijeka. You can see the bus schedule and ticket prices here.
Pula airport is located 7 km from the city centre, with shuttle buses usually departing 30 min after arrival of each flight. You can buy your ticket for the shuttle bus here. You can travel to Rijeka by bus or rent a car.
Rijeka airport is located on the Island of Krk, 30 km from the city centre. You can see prices and book a transfer to Opatija here and to the centre of Rijeka here. If you rent a car at the airport, you will have to cross a bridge to get to the mainland, which will cost you 5 EUR.