📜  CSS 钳制与媒体查询 - CSS 代码示例

📅  最后修改于: 2022-03-11 14:47:50             🧑  作者: Mango

代码示例1
Lorem ipsum ...
/* Using clamp -------------------------- */ article { width: clamp(200px, 50%, 800px); } /* Using media queries ------------------ */ /* Default */ article { width: 50%; } /* Small screens */ @media only screen and (max-width: 600px) { article { width: 200px; } } /* Large screens */ @media only screen and (min-width: 1200px) { article { width: 800px; } }