gpt4 book ai didi

css - 错误的 css 媒体语法

转载 作者:太空宇宙 更新时间:2023-11-04 02:12:55 25 4
gpt4 key购买 nike

这里有什么问题吗?

<link rel="stylesheet" href='index-02.css'
media="screen and (min-width: 481px and max-width:959px)">

验证 this page 上的代码我收到一个错误:

Error: Bad value screen and (min-width: 481px and max-width:959px) for attribute media on element link: Expected whitespace or ) but saw a instead.

最佳答案

您的语法略有偏差。每个表达式都需要包含在括号中:

<link rel="stylesheet" href='index-02.css'
media="screen and (min-width: 481px) and (max-width:959px)">

来自documentation :

Parentheses are required around expressions; failing to use them is an error.

关于css - 错误的 css 媒体语法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39424271/

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