0

我似乎无法让我的页脚在手机和平​​板电脑上保持 100% 的宽度,这在浏览器上很好!请帮忙,这是我的CSS:

    .footerbox {
@media only screen and (min-device-width : 768px); (max-device-width : 1024px);
float :left;
width:100%;
height:300px;
margin-left:0;
margin-right:0;
background-image:url(../images/aaheader12.jpg);
background-position:center bottom;
background-repeat : no-repeat;
font-family : Calibri;
font-size : 14px;
color : #000;
    }
4

2 回答 2

0
@media only screen and (max-width: 1022px),
only screen and (min-device-width : 768px) and (max-device-width : 1024px),
only screen and (min-device-width : 320px) and (max-device-width : 568px),
only screen and (min-device-width : 320px) and (max-device-width : 480px){your css}

此查询适用于设备宽度 <1022 像素的 iPad、iPhone、移动设备和平板电脑。

于 2013-09-30T13:18:08.887 回答
0

Delete that @media line, it's not correct syntax (media queries get wrapped around rules, not nested inside them) and it sounds like you can just use the same styles for your footer across all devices anyway.

于 2013-09-30T13:03:58.827 回答