如何防止在小屏幕上显示我的网站?

问题描述:

我想阻止我的显示在小屏幕网站同移动设备或平板电脑... ,我想在这个屏幕,打开我的网站在大屏幕如何防止在小屏幕上显示我的网站?

我怎样才能做到这一点,以显示消息?

使用媒体查询:

//the css inside this block will only be applied to devices with less than 800px width 
@media (max-width: 800px) { 
    //add css here to show the message to open the webpage on a device with a larger screen 
} 

您可以了解更多关于这里媒体查询:https://www.w3schools.com/cssref/css3_pr_mediaquery.asp

正如你所标记的wordpress:您可以添加自定义CSS,你可以配置你的主题。

+0

我使用WordPress站点 –

设置宽度和高度,使用媒体查询这样

@media screen and (max-width:360px) and (max-height:520px){ 
    body{ 
    display:none 
    } 
} 

pen is here与可调整大小的窗口