简体   繁体   English

移动CSS未被定位

[英]mobile css not being targeted

I have a project that has different layouts depending on the device you use to access it. 我有一个项目,它具有不同的布局,具体取决于您用来访问它的设备。 I am using the following line: 我正在使用以下行:

<link rel="stylesheet" type="text/css" media="only screen and (max-device-width: 480px)" href="mobile_style.css" />

on my html to access a different file with the css for mobile devices. 在我的HTML上,以使用CSS为移动设备访问其他文件。 The line is below the general css one. 该线在一般的css下面。 The css is not being targeted for mobile. CSS并非针对移动设备。

here is the site. 这是网站。

http://maxruiz-portraits.com http://maxruiz-portraits.com

To make things worse and more confusing, I copied and pasted code that I had written for this site: 为了使事情变得更糟,更令人困惑,我复制并粘贴了为该站点编写的代码:

http://maxruiz-parana.com http://maxruiz-parana.com

And there the link tag works. 链接标签在那里工作。 Any ideas as to why much appreciated. 任何关于为什么大加赞赏的想法。 I can post code if you'd like or you can look at it in browser. 如果您愿意,我可以发布代码,也可以在浏览器中查看代码。

Thank you. 谢谢。

您的link标记在网站的body中,而不是在标head

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM