我希望在移动设备或平板电脑的小屏幕上防止显示我的网站... 我想在此屏幕中显示以大屏幕打开我的网站的消息
我该怎么做?
答案 0 :(得分:2)
使用像这样的媒体查询设置宽度和高度
@media screen and (max-width:360px) and (max-height:520px){
body{
display:none
}
}
带有可调整大小窗口的
答案 1 :(得分:1)
使用媒体查询:
//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,以便配置主题。