使用tachyons css库:
我不明白ns断点是如何工作的。根据文档,断点定义为:
Media Query Extensions:
  -ns = not-small [ @media screen and (min-width: 30em) ]
  -m  = medium [ @media screen and (min-width: 30em) and (max-width: 60em) ]
  -l  = large [ @media screen and (min-width: 60em) ]我认为下面的代码将确保根据宽度只有一个div的可见性。
<div class="dn-ns dn-m dn-l">Mobile</div>
<div class="dn db-ns">Small</div>
<div class="dn db-m">Medium</div>
<div class="dn db-l">Large</div>但是,ns断点似乎也在medium和large断点处起作用。
mobile breakpoint, it's default
ns and medium, both kicking in
是不是因为ns断点没有指定上限,所以覆盖了任何非移动性的内容?
发布于 2021-09-11 10:46:10
<!---display: none on all devices which are not small(dn-m and dn-l are redundant here) --->
<div class="dn-ns dn-m dn-l">Mobile</div> https://stackoverflow.com/questions/64979518
复制相似问题