布局
isolation
Utilities for controlling whether an element should explicitly create a new stacking context.
| 类 | 样式 |
|---|---|
isolate | isolation: isolate; |
isolation-auto | isolation: auto; |
示例(Examples)
基本示例(Basic example)
使用 isolate 和 isolation-auto 工具来控制一个元素是否应该显式创建新的堆叠上下文:
🌐 Use the isolate and isolation-auto utilities to control whether an element should explicitly create a new stacking context:
<div class="isolate ..."> <!-- ... --></div>响应式设计(Responsive design)
在 isolation 工具前面使用断点变体如 md: 仅在 medium 屏幕尺寸及以上时应用工具:
<div class="isolate md:isolation-auto ..."> <!-- ... --></div>请参阅 变体文档 详细了解如何使用变体。