在ipad /平板电脑上水平线不是全宽

时间:2013-08-13 23:11:29

标签: ipad mobile

在ipad,iphone或平板电脑上观看时,设置为100%宽度的简单水平线会在右侧切断。基于PC的浏览器没问题。在我设置的标题中:

meta name =“viewport”content =“width = device-width,initial-scale = 1,maximum-scale = 1”

示例页面:http://www.33degrees.ca/line/

关于如何修复的任何想法?

1 个答案:

答案 0 :(得分:0)

在网站样式表的开头尝试CSS重置,如下所示:

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
    display: block;
}
body {
    line-height: 1;
}
ol, ul {
    list-style: none;
}
blockquote, q {
    quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}