PANAMA CITY BEACH, Fla. — The sun was sublime, the flour-soft sand could scarcely have been more tempting and the D.J. music thumped loudly enough to jiggle the beer cups resting on nearby tables. All that was missing were the throngs of booze-soaked, sunburned spring breakers who usually swarm this beach town during March.

The scarcity of the party-hard population was no accident. Last year, after a particularly rowdy spring break that saw an alleged sexual assault on a crowded beach in broad daylight (it was recorded and went viral) and gunfire at a house party that injured seven partygoers, local officials clamped down. They passed more than 20 ordinances to curb the debauchery, drinking and violence that they had concluded was marring the town’s image. In response, students sprinted to Facebook, Twitter, Snapchat and Instagram, quickly spreading the news — using the hashtag #RIPPCB (Rest in Peace Panama City Beach) — that the party here was over.

Amplified through the social media megaphone, the drop was far steeper than even the businesses who opposed the measures had anticipated. Last week, peak time for spring break, scores of bars, restaurants, clubs, hotels, fast-food franchises and taxi companies that typically see their March profits bulge sat forlorn, with some reporting a 90 percent drop in customers.