Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/88.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 移动站点上的大小调整问题_Html_Css - Fatal编程技术网

Html 移动站点上的大小调整问题

Html 移动站点上的大小调整问题,html,css,Html,Css,我目前正在为一个功能齐全的桌面站点开发一个移动站点。使用媒体查询,我可以在iPhone或iPod等显示器上缩小实际内容区域的大小。但是,页面的其余部分(如页脚和页眉)不希望正确缩小大小。有什么建议吗?您可以在此处查看该网站:www.tobynews.com页脚如果有效,则正文无效 使用%和min或max #content { /*you css*/ margin-left: auto; margin-right: auto; width: 900px;/* use

我目前正在为一个功能齐全的桌面站点开发一个移动站点。使用媒体查询,我可以在iPhone或iPod等显示器上缩小实际内容区域的大小。但是,页面的其余部分(如页脚和页眉)不希望正确缩小大小。有什么建议吗?您可以在此处查看该网站:www.tobynews.com

页脚如果有效,则正文无效

使用
%
min
max

#content {
    /*you css*/
    margin-left: auto;
    margin-right: auto;
    width: 900px;/* use % for size
    max-width: you size;
    min-width: you size;*/
}
图像自动

body{
    background-image: url(uno.jpg);
    background-attachment: fixed;
    top: 0px;
    left: 0px;
    background-size: cover;
    background-position: 50% 50%;
    background-repeat: no-repeat;
    /* and you css*/
}
检测到的大小屏幕

@media screen and (max-width: 750px){
  footer{
    width: /*you size*/;
  }
}

您是否在页眉/页脚/其他元素上使用任何内联样式(内部HTML标记为)?如果是这样,它们将优先于任何css规则。另外,要注意媒体查询的顺序。在某些情况下,较低级别的规则优先于较高级别的规则!