Use panzoom extension: https://github.com/PLAYG0N/mkdocs-panzoom
My config in mkdocs.yml
plugins:
- panzoom:
always_show_hint: false
hint_location: "top"
full_screen: true
include_selectors:
- ".mermaid"
- "img"