gpt4 book ai didi

css - 如何为单独的媒体查询条件使用相同的 css

转载 作者:太空宇宙 更新时间:2023-11-03 20:54:35 25 4
gpt4 key购买 nike

对于某个 CSS 规则,我有 2 个条件:

@media all and (min-width:481px) and (max-width:1024px)

@media all and (max-height:900px)

因为我猜我不能将条件与 连接,有没有办法不为这两个条件复制 CSS 规则?

最佳答案

您可以使用逗号来做到这一点:

@media all and (min-width:481px) and (max-width:1024px), 
all and (max-height:900px)

关于css - 如何为单独的媒体查询条件使用相同的 css,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12129662/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com