【发布时间】:2010-07-08 05:49:29
【问题描述】:
这是在我的重置脚本中:
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, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
除非我的 CSS 中有此代码,否则我的 google 代码会调整信息窗口以适应内容。通过反复试验,我发现如果我删除 margin:0 ,那么滚动条就会消失并且内容会正确匹配,并且信息窗口会按预期调整大小。
我还发现,如果我从标签列表中删除“p”,它也可以工作 - 所以我假设我不能在我的重置脚本中将边距设置为 0。
我不知道如何解决这个问题。没有意义!
这段代码确实有效,谷歌地图信息窗口很好:
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
p{
padding: 0;
border: 0;
outline: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
【问题讨论】: