我正在学习语义用户界面。但我总是混淆容器和段。我不知道什么时候使用容器或段,那些在边距旁边看起来没有什么不同。 有人给我解释一下。 谢谢。
最佳答案
容器和段在外观和功能上都不同。
看:
- 一个片段具有 box-shadow、border-radius 和border(阅读:特殊格式)的属性,使其看起来高高在上。
- 容器看起来更简单。
- 注意:基本句段没有这种特殊格式。
行为:
A container is an element designed to contain page elements to a reasonable maximum width based on the size of a user's screen. This is useful to couple with other UI elements like grid or menu to restrict their width to a reasonable size for display.
容器的最大宽度取决于用户的大小,但段没有此限制。一个段将占据可用空间的整个宽度。
注意:但是您可以在 site.variables 中覆盖它:
Adjusting site breakpoints in site.variables to use custom values will automatically adjust container widths.
关于css - 语义 ui 容器段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39613586/