CSS没有在macossafari和chrome上正确加载

CSS is not loading properly on mac OS safari and chrome

本文关键字:加载 chrome macossafari CSS      更新时间:2023-09-26

对于我制作的网站,苹果设备的CSS加载不正确。

我单独维护了所有媒体查询语句和样式表。因此,它不能在MAC操作系统safari和chrome中正确显示。但休息所有的浏览器和设备都很好。

链接:参考链接

<link href="css/mobile.css" rel="stylesheet" media="screen and (max-width: 390px)" />
<link href="css/mobile.css" rel="stylesheet" media="screen and (min-width: 391px) and (max-width: 500px)" />
<link href="css/mobile.css" rel="stylesheet" media="screen and (min-width: 501px) and (max-width: 768px)" />
<link href="css/medium.css" rel="stylesheet" media="screen and (min-width: 769px)" />

这个查询只是我维护的流动性。伙计们帮我搞定

创建一个CSS文件,并使用以下技术将所有代码放入其中。

HTML:

<link href="css/style.css" rel="stylesheet" />

style.css代码:

@media screen and (max-width: 390px) {
/* 
*** Add CSS proparty ***
*/
}
@media screen and (min-width: 391px) {
/* 
*** Add CSS proparty ***
*/
}
@media screen and (min-width: 501px) {
/* 
*** Add CSS proparty ***
*/
}
@media screen and (min-width: 769px) {
/* 
*** Add CSS proparty ***
*/
}

它经过了测试。我在每个项目中都使用它。

Create CSS file and put the code inside the following technique
@media (min-width: 500px ) and (max-width: 800px)  {  
/* CSS property */ 
}

当我在mac中使用文本编辑器开发我的第一个网页时,也发生了同样的事情。

我通过调整键盘上的引号来解决问题。为此,请转到

首选项>键盘>文本

在右边,你会发现双引号和单引号。选择具有简单引号类型的选项。