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
在这段代码里面要添加hairlines的样式类,但是我没有找到对应的类样式
// detect 0.5px supports if (dpr >= 2) { var fakeBody = document.createElement('body') var testElement = document.createElement('div') testElement.style.border = '.5px solid transparent' fakeBody.appendChild(testElement) docEl.appendChild(fakeBody) if (testElement.offsetHeight === 1) { docEl.classList.add('hairlines') } docEl.removeChild(fakeBody) }
The text was updated successfully, but these errors were encountered:
代码检测到如果你的值是1px会在选择前器添加一个类名。也可以通过PostCSS处理器来控制,让1px的添加这个类名。其实使用PostCSS-write-svg能很好的处理1px的问题。我在《再聊移动端的适配》一文中有提到:https://www.w3cplus.com/css/vw-for-layout.html 另外现在对vw之类的支持很好了。我们测试过top30以上的机型。
1px
vw
Sorry, something went wrong.
No branches or pull requests
在这段代码里面要添加hairlines的样式类,但是我没有找到对应的类样式
The text was updated successfully, but these errors were encountered: