Why not mount an aircraft-carrier ski jump on hydraulic pistons so it can retract?
Short answerThe hydraulics and structure needed to support the ramp's loads would add so much weight that the arrangement would be self-defeating.
NotesA retractable ramp appears to offer a way to recover flight-deck space when fixed-wing aircraft are not launching. The supporting structure and hydraulic machinery would have to bear the ramp and aircraft launch loads. That equipment would add enough weight and complexity to consume the apparent benefit. The answer illustrates how a clever moving feature can become self-defeating once its whole-ship engineering cost is included.