![](/img/trans.png)
[英]Redirect a site to a Mobile version, error with Google Mobile-Friendly Test
[英]Chrome for Android: How to enable mobile-friendly ' on web page
我使用CSS和CSS 3创建了这个http://nl4.christianity24.org/。它使用PHP和mysqli创建了网站。 我该怎么办。
就像使用@media(); 移动视点的最佳CSS 3格式是什么?
为确保所有设备都能正确渲染和触摸缩放,请尝试在文档的<head>
中添加此meta标签。
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
然后,您可以使用各种媒体查询来自定义您的网站。
// Large devices (desktops, less than 1200px)
@media (max-width: 1199.98px) {
body {
background-color: red;
}
}
// Medium devices (tablets, less than 992px)
@media (max-width: 991.98px) {
body {
background-color: yellow;
}
}
// Small devices (landscape phones, less than 768px)
@media (max-width: 767.98px) {
body {
background-color: blue;
}
}
// Extra small devices (portrait phones, less than 576px)
@media (max-width: 575.98px) {
body {
background-color: violet;
}
}
希望这会有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.