I have created a small HTML file to create a camera shutter open-close effect. You can tailor it very simply to your requirements.
Just download the file below and remove the “.txt” suffix and run it in a browser. I used it as a browser-source in OBS Studio to creare the demo video below:
If you intend to use the CSS clip-path property check out the clippy webpage. It creates the various parameters for almost any shape you want. You just choose a shape and move the handles to your liking: Clippy — CSS clip-path maker