我正在尝试在元素上使用负的上边距,并且它在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
原文链接:https://www.f2er.com/css/530773.htmlThe 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.