如何删除较小屏幕尺寸的页脚

时间:2014-02-19 18:24:12

标签: html ios css wordpress

我正在使用wordpress响应主题,但是我需要页脚不会出现在比ipad小的任何屏幕尺寸上。在iphone 5尺寸屏幕上观看时,页脚太笨重,在某些页面上覆盖了内容。在这种情况下,为移动电话尺寸屏幕移除它将更加简洁。是否有CSS命令或任何替代方法将页脚移除到特定屏幕尺寸以下?

非常感谢,菲尔

2 个答案:

答案 0 :(得分:2)

我会说:

@media (min-width: 0px) and (max-width: 480px){
    #footer { 
        display : none; 
        visibility : hidden; 
    }
}

或更短:

@media (max-width: 480px){
    #footer { 
        display : none; 
        visibility : hidden; 
    }
}

答案 1 :(得分:0)

CSS媒体查询应该有效

@media only screen and (max-width: enter breakpoint) {
#footer {
        display: none;
    }
}