A nanocapsule includes a liquid hydrophobic care including an essential oil, and a shell encapsulating the core. The shell includes a copolymer having repeating units of Formula (I) and (II) wherein X, L1, R1, R2, y, and p are as described herein. A dispersion is also disclosed, wherein the dispersion includes a plurality of nanocapsules. The nanocapsules described herein are particularly useful for the treatment of bacterial biofilms.; 展开▼