Is it possible to set the height of a Tableau dashboard equal to cero using CSS?

I’m creating a website were I’m displaying data visualizations from Tableau Public. I’m embedding them using the HTML embed script. I’d like the dashboards to be hidden when the website loads at first and add a toggle button that shows the dashboard and collapses it. I was trying to achieve this setting the height of the tableauPlaceholder to 0 .tableauPlaceholder { height: 0; } and then add a class to it that sets the height to a fixed value, like this: .show-dashboard { height: 20rem } and give the button the functionality to toggle this class using JavaScript.

This approach didn’t work because the Tableau graphic keeps showing even if the height is 0 . So, I’m wondering if it’s even possible to set the height of a tableau embed to 0? Is there another approach to achieve this?

Thank you in advance