Britain has been Brexiting on and off for centuries - from time to time we recoil from the Continent and sever ties.
For Part I see
Napoleonic Wars
After the French Revolution, France was attacked by her neighbours, the Austrians, the Belgians and the Spanish, Napoleon beat them back and then went on the attack, swiftly taking land. He captured the Netherlands, most of Germany and Austria, and successfully invaded Spain.
His victories went to his head and he turned his attention to the UK, which had been watching on the sidelines, financing his opponents but not really getting directly involved. In an attempt to isolate Britain economically, he seized all the continental ports, to prevent British exports to the continent.
This was action Britain couldn't ignore, and the British swung into action, patrolling the seas to isolate France from it's colonies.
The French blockade caused inflation to rise in the UK, as goods got scarce. In addition Britain couldn't sell it's wool to the continent. After a seven year battle, Britain took control of continental Europe, starting in Portugal and pushing Napoleon back, finally defeating him at Waterloo.
More interesting is what happened to the British economy. As in Tudor times, they had to find new markets. Relations were patched up with the new American Republic with a free trade deal, and at home the scarcity of goods triggered the Industrial Revolution, as businesses sought to bring prices down through innovation. Out went wool, the staple export of the previous 500 years, and in came cotton cloth, made from raw cotton imported from the Americas with the finished cloth exported to the rest of the Empire, as well as to existing allies like the Ottomans.
The combination of the Industrial Revolution and the development of markets in the Empire, meant that the British economy decoupled from that of continental Europe in the 19th century. After the Napoleonic Wars ended, Britain went back to it's policy of splendid isolation, watching what was going on in Europe (multiple revolutions and minor wars) but not getting involved. As a result of this rejection of Europe, Britain became the wealthiest country in the world.
The Exchange Rate Mechanism
In the dying days of the Thatcher government, Britain joined the European Exchange Rate Mechanism, which was a sort of fixed exchange system, where currencies were pegged to each other and could move only a few percentage points. The exchange rate mechanism was meant to converge currencies as a precursor to a single currency, the Euro.
Eurosceptics were desperately unhappy about this development. They were sure it was disastrous. And sure enough the exchange rate mechanism triggered a severe recession all over Europe. Europhiles believed that the recession was down to global events, not the ERM, and made dire warnings about leaving the ERM.
In the lead up to Black Wednesday, the pound came under pressure from the markets, which were sure that there wasn't the political will to stay in the ERM. The morning of the 16th September 1992 was particularly dramatic with the Bank of England spending a million pounds to defend the pound against short sellers. The govt tried to raise interest rates twice to stem the flow, and then gave up. The pound crashed out of the ERM.
Several other European currencies also came under attack, such as the Irish punt and the Italian Lira. But they were expected to rejoin the ERM after a suitable period, and did.
Britain refused to. The eurosceptics felt vindicated, the ERM (and euro) was a silly idea in their opinion. The europhiles continued to predict that dark things would happen if Britain did not rejoin the ERM - but were proved wrong as the British economy recovered fast and then continued to grow for another fifteen consecutive years.
The experience turned Britain as a whole into a eurosceptic nation. People began to agitate for a referendum to leave the EU itself. They reasoned that most EU projects were flawed, and just as crashing out of the ERM proved beneficial, crashing out of the EU would be more beneficial. The eurozone crisis of 2011 - 2013 intensified this belief, which eventually led to the UK voting to leave the EU in 2016.