雖然w3c制訂了html的一些標準:瀏覽器們都會按照自己預定義的樣式來解析渲染網頁中的標簽,firefox可以通過在地址欄里輸入resource://gre/res/html.css的命令來得到firefox的默認樣式表。要是ie也有這個命令該多好!你也可以在不同版本的firefox地址欄輸入這個命令,這樣就可以對比firefox不同版本的差異,這讓我們在reset css的時候有了重要的參考。 /* ***** begin license block ***** * version: mpl 1.1/gpl 2.0/lgpl 2.1 * * the contents of this file are subject to the mozilla public license version * 1.1 (the "license"); you may not use this file except in compliance with * the license. you may obtain a copy of the license at * http://www.mozilla.org/mpl/ * * software distributed under the license is distributed on an "as is" basis, * without warranty of any kind, either express or implied. see the license * for the specific language governing rights and limitations under the * license. * * the original code is mozilla.org code. * * the initial developer of the original code is * netscape communications corporation. * portions created by the initial developer are copyright (c) 1998 * the initial developer. all rights reserved. * * contributor(s): * blake ross <[email protected]> * * alternatively, the contents of this file may be used under the terms of * either of the gnu general public license version 2 or later (the "gpl"), * or the gnu lesser general public license version 2.1 or later (the "lgpl"), * in which case the provisions of the gpl or the lgpl are applicable instead * of those above. if you wish to allow use of your version of this file only * under the terms of either the gpl or the lgpl, and not to allow others to * use your version of this file under the terms of the mpl, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the gpl or the lgpl. if you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the mpl, the gpl or the lgpl. * * ***** end license block ***** */
@namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to html */
/* nested lists have no top/bottom margins */ ul ul, ul ol, ul dir, ul menu, ul dl, ol ul, ol ol, ol dir, ol menu, ol dl, dir ul, dir ol, dir dir, dir menu, dir dl, menu ul, menu ol, menu dir, menu menu, menu dl, dl ul, dl ol, dl dir, dl menu, dl dl { margin-top: 0; margin-bottom: 0; }
/* 2 deep unordered lists use a circle */ ol ul, ul ul, menu ul, dir ul, ol menu, ul menu, menu menu, dir menu, ol dir, ul dir, menu dir, dir dir { list-style-type: circle; }
/* 3 deep (or more) unordered lists use a square */ ol ol ul, ol ul ul, ol menu ul, ol dir ul, ol ol menu, ol ul menu, ol menu menu, ol dir menu, ol ol dir, ol ul dir, ol menu dir, ol dir dir, ul ol ul, ul ul ul, ul menu ul, ul dir ul, ul ol menu, ul ul menu, ul menu menu, ul dir menu, ul ol dir, ul ul dir, ul menu dir, ul dir dir, menu ol ul, menu ul ul, menu menu ul, menu dir ul, menu ol menu, menu ul menu, menu menu menu, menu dir menu, menu ol dir, menu ul dir, menu menu dir, menu dir dir, dir ol ul, dir ul ul, dir menu ul, dir dir ul, dir ol menu, dir ul menu, dir menu menu, dir dir menu, dir ol dir, dir ul dir, dir menu dir, dir dir dir { list-style-type: square; }
/* leafs */
/* <hr> noshade and color attributes are handled completely by * the nshtmlhrelement attribute mapping code */ hr { display: block; height: 2px; border: 1px inset; margin: 0.5em auto 0.5em auto; color: gray; -moz-float-edge: margin-box; -moz-box-sizing: border-box; }
object:-moz-broken > *|*, applet:-moz-broken > *|* object:-moz-user-disabled > *|*, applet:-moz-user-disabled > *|* { /* inherit in the object's alignment so that if we aren't aligned explicitly we'll end up in the right place vertically. see bug 36997. note that this is not !important because we _might_ be aligned explicitly. */ vertical-align: inherit; }
img:-moz-suppressed, input:-moz-suppressed, object:-moz-suppressed, embed:-moz-suppressed, applet:-moz-suppressed { /* set visibility too in case the page changes display. note that we _may_ want to just set visibility and not display, in general, if we find that display:none breaks too many layouts. and if we decide we really do want people to be able to right-click blocked images, etc, we need to set neither one, and hack the painting code.... :( */ display: none !important; visibility: hidden !important; }
/* xxx this should not be necessary, we should be stopping blinking of any kind in print preview, not just the <blink> element */ blink { text-decoration: none; }