Actually, the F-4 wasn't developed as a joint fighter. It was a Navy only project, pressed into service with the Air Force because the Air Force had no decent fighters at the time. Interceptors like the F-104 and F-106, fair weather light bombers like the F-105 fought in Vietnam and performed poorly. Both the Navy F-4 and A-7 were adopted by the Air Force out of necessity.
The F-18 was a different story. Basically a Northrop YF-17 (the competition for the General Dynamics F-16) built by McDonnell Douglas (the Navy wouldn't have a Northrop plane since they did not have experience building carrier aircraft), bought by the Navy. Under the agreement between Northrop and McD, Northrop was supposed to be sub-contractor for the Navy planes, and prime contractor for the foreign sales land based versions. In a stroke of marketing genius, Micky D sold other countries the carrier version, to be based on land.
So, no, the Air Force wouldn't buy the "loser" of the YF-16/YF-17 competition. That is not to say the YF-17/F-18 is a lesser aircraft.
The F-111 was another story. It was a plane nobody wanted, except the Secretary of Defense, who was not quite as smart as he thought he was. The Navy, wisely seeing the way the wind was blowing, let the aircraft be developed and kept their mouths shut. About the time they were handed the monstrosity, they correctly declared the "fighter" was too heavy for carrier ops.
The Air Force got stuck with that underperforming pig. The aircraft did shine during the Gulf War though.