fix: 修复当页面宽度恰为640px时菜单栏和菜单按钮都不显示的问题 #257
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
两个commits用了两种写法,第一个的commit a1e75b6 中使用的
@media screen and (width > 640px)
的浏览器支持情况如下:✅ Chrome 104+ (2022年8月)
✅ Firefox 103+ (2022年7月)
✅ Safari 15.4+ (2022年3月)
✅ Edge 104+ (基于Chromium)
❌ IE 不支持
第二个commit c36326a 改为了传统写法,但在页面宽度由于DPR产生的子像素计算误差卡在 639.9px到640px之间时,侧边菜单栏和菜单按钮会同时显示