We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
当内容长度超过屏幕宽度时,如果不设置overflow,那么浏览器页面会按比例(最长元素宽度/设备宽度)缩放,引发显示异常的问题。 复现代码如下:
<html> <head> <meta name="viewport" content="initial-scale=1.0, width=device-width" /> </head> <style> * { padding: 0; margin: 0; } .overflow { overflow: auto; } </style> <script> function changeOverflow() { console.log('1111111111111111111'); const ele = document.getElementById('testDiv'); const overflow = ele.className; if (overflow) { ele.className = '' } else { ele.className = 'overflow' } } </script> <body> <button onclick="changeOverflow()">changeOverflow</button> <p style="width: 100vw; background-color: black;">fff</p> <div id="testDiv" class="overflow">fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff</div> </body> </html>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
当内容长度超过屏幕宽度时,如果不设置overflow,那么浏览器页面会按比例(最长元素宽度/设备宽度)缩放,引发显示异常的问题。
复现代码如下:
The text was updated successfully, but these errors were encountered: