CSS-HTML5元素在Firefox 3.6.x中不接受负的margin-top

前端之家收集整理的这篇文章主要介绍了CSS-HTML5元素在Firefox 3.6.x中不接受负的margin-top 前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

我正在尝试在元素上使用负的上边距,并且它在Firefox中不起作用. Chrome和IE(使用HTML5-shiv)正在正确呈现它.我已经给出了HTML5元素(包括display:块).

有什么想法吗? CSS(如果需要):

aside,article,section { display: block; }


section#banner {
background: url(images/banner.png) no-repeat 3px 3px;
border: #CCD1DB 1px solid;
-moz-border-radius: 10px; /* FF1+ */
-webkit-border-radius: 10px; /* Saf3+,Chrome */
border-radius: 10px; /* Opera 10.5,IE 9 */
-moz-Box-shadow: 0px 0px 4px #E0E3E9; /* FF3.5+ */
-webkit-Box-shadow: 0px 0px 4px #E0E3E9; /* Saf3.0+,Chrome */
Box-shadow: 0px 0px 4px #E0E3E9; /* Opera 10.5,IE 9.0 */
display: block;
height: 350px;
margin: -50px auto 0;
overflow: hidden;
padding: 3px;
position: relative;
width: 600px;
}
最佳答案
http://dev.w3.org/html5/spec/Overview.html#the-section-element

The section element is not a generic
container element. When an element is
needed for styling purposes or as a
convenience for scripting,authors are
encouraged to use the div element
instead. A general rule is that the
section element is appropriate only if
the element’s contents would be listed
explicitly in the document’s outline.

更多资源:
http://html5doctor.com/the-section-element/

原文链接:https://www.f2er.com/css/530773.html

猜你在找的CSS相关文章