Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Isotope 为“砌体”类型的布局构建一个响应式 Web。但是,当我display: none使用媒体查询设置同位素项目时,尺寸保持不变,使其仍然占用空间。猜猜必须有一个简单的解决方案,我只是看不到?
display: none
对不起我的模糊问题。我发现一旦你把一个元素变成一个同位素项目,即使display: none设置它也会占用它的空间。在我的情况下,解决方案是简单地添加width: 0; height= 0.
width: 0; height= 0