Edit the css of wrapper div generated by vite #2312
Unanswered
shahnihal01
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
While using react-three-fiber and vite, my canvas is wrapped in a div automatically by vite I guess:
<div style="position: relative; width: 100%; height: 100%; overflow: hidden; touch-action: none;"><div style="width: 100%; height: 100%;"><canvas style="display: block; width: 375.333px; height: 667.333px;" data-engine="three.js r141" width="750" height="1334"></canvas></div></div>
The "touch-action: none" makes it impossible to scroll when using mobile devices. I've tried giving inline styling to the canvas but that too isn't working. How can I solve this?
Beta Was this translation helpful? Give feedback.
All reactions