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.
如何在语义 UI 的主菜单中实现仅移动或仅桌面视图?响应设备功能是否仅适用于语义 UI 网格中所述的行和列?任何人都可以建议我如何使用语义 UI 来实现这一点,或者我应该使用 javascript 来做同样的事情吗?
也将 HTML 类添加到菜单
工作演示
HTML
<div class="ui inverted menu grid"> <div class="mobile only row">...</div> <div class="tablet only row">...</div> <div class="computer only row">...</div> </div>
对于填充问题,使用以下类 Ovrride CSS
.ui.menu.grid>.computer.only.row { padding:0; }