首頁  >  文章  >  web前端  >  網頁設計參考 firefox 預設樣式_HTML/Xhtml_網頁製作

網頁設計參考 firefox 預設樣式_HTML/Xhtml_網頁製作

WBOY
WBOY原創
2016-05-16 16:42:191468瀏覽

雖然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. express >* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contritor(s):
* Blake Ross
*
* 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
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 */
/* bidi */
[dir="rtl"] {
direction: rtl;
unicode-bidi: embed;
}
[dir="ltr"] {
direction: ltr;
unicode-bidi: embed;
;
unicode-bidi: embed;
}
bdo[dir] {
unicode-bidi: bidi-override;
}
/* blocks */
html, div, map, dt, isindex, form {
display: block;
}
body {
display: block;
margin: 8px;
}
p, dl, multicol {
display: block;
margin: 1em 0;
}
dd {
display: block;
-moz-margin-start: 40px;
}
blockquote {
display: block; 🎜>margin: 1em 40px;
}
address {
display: block;
font-style: italic;
}
center {
display: block text-align: -moz-center;
}
blockquote[type=cite] {
display: block;
margin: 1em 0px;
-moz-padding-start: 1em ;
-moz-border-start: solid;
border-color: blue;
border-width: thin;
}
span[_moz_quote=true] {
}
span[_moz_quote=true] {
color: blue;
}
pre[_moz_quote=true] {
color: blue;
}
h1 {
display: block;
font-size: 2em;
display: block;
font-size: 2em;
display: block;
font-size: 2em;
display: block;
font-size: 2em;
display: block;
font-size: 2em;
display: 🎜 >font-weight: bold;
margin: .67em 0;
}
h2 {
display: block;
font-size: 1.5em;
font-weight: bold ;
margin: .83em 0;
}
h3 {
display: block;
font-size: 1.17em;
font-weight: bold;
margin: 1em 0;
}
h4 {
display: block;
font-weight: bold;
margin: 1.33em 0;
}
h5 {
play : block;
font-size: 0.83em;
font-weight: bold;
margin: 1.67em 0;
}
h6 {
display: block;
font-size: 0.67em;
font-weight: bold;
margin: 2.33em 0;
}
listing {
display: block;
font-family: -moz -fixed;
font-size: medium;
white-space: pre;
margin: 1em 0;
}
xmp, pre, plaintext {
display: block;
xmp, pre, plaintext {
display: block;
font-family: -moz-fixed;
white-space: pre;
margin: 1em 0;
}
/* tables */
table {
display: table;
border-spacing: 2px;
border-collapse: separate;
margin-top: 0;
margin-bottom: 0;
/* XXXldb do we want this if if if 're border-collapse:collapse ? */
-moz-box-sizing: border-box;
text-indent: 0;
} table[align="left"] { float: left; } table[align="right"] { float: right; text-align: start; } table[rules]: not([rules="none"]) { border-collapse: collapse; } /* 標題繼承自table 而不是table-outer */
caption {
display: table-caption;
文字對齊:居中;
-moz-box-sizing:邊框框;
}
table[align="center"] > 標題{
margin-left: auto;
右邊距:自動;
}
表格[align="center"] > 標題[align="left"] {
margin-right: 0;
}
表格[align="center"] > 標題[align="right"] {
margin-left: 0 ;
}
tr {
顯示:表格行;
垂直對齊:繼承;
}
col {
顯示:表格欄位;
}
colgroup {
顯示:表格列組;
}
tbody {
顯示:表行組;
垂直對齊:中間;
}
thead {
顯示:表頭組;
垂直對齊:中間;
}
tfoot {
顯示:表頁腳組;
垂直對齊:中間;
}
/* 對於沒有tbody 的XHTML 表*/
table > tr {
vertical-align: middle;
}
td {
顯示:表格單元格;
垂直對齊:繼承;
文字對齊:繼承;
內邊距:1px;
}
th {
顯示:表格單元格;
垂直對齊:繼承;
字體粗細:粗體;
內邊距:1px;
}
tr > 形式:-moz-is-html,tbody > 形式:-moz-is-html,
thead > 形式:-moz-is -html,tfoot > 形式:-moz- is-html,
table > form:-moz-is-html {
/* 重要提示:不要在HTML 中顯示這些表單*/
display: none !important;
}
/* 內嵌*/
q:before {
content: open-quote;
}
q:after {
內容:閉引號;
}
b,強{
字型粗細:加粗;
}
i、cite、em、var、dfn {
字型樣式:斜體;
}
tt、程式碼、kbd、samp {
字體系列:-moz-fixed;
}
u, ins {
文字修飾:底線;
}
s}
文字修飾:底線;
}
s 、strike、del {
文字裝飾:換行;
}
閃爍{
文字裝飾:閃爍;
}
大{
字體大小:更大;
}
大{
字體大小:更大;
}
大{
字體大小:更大;
}
小{
字體大小:較小;
}
sub {
垂直對齊:sub;
字體大小:較小;
行高:正常;
}
sup {
垂直對齊:超級;
字體大小:較小;
行高:正常;
}
nobr {
空白:nowrap;
}
/* 標題*/
縮寫[標題], 縮寫[標題] {
邊框底部:點線1px;
}
/* 列表* /
ul, menu, dir {
display: block;
列表樣式類型:光碟;
保證金:1em 0;
-moz-padding-start:40px;
}
ol {
顯示:塊;
列表樣式類型:十進位;
保證金:1em 0;
-moz-padding-start:40px;
}
li {
顯示:列表項目;
}
/* 巢狀清單沒有上/下邊距*/
ul ul, ul ol, ul dir, ul menu, ul dl,
ol ul , ol ol, ol dir, ol菜單, ol dl,
dir ul, dir ol, dir dir, dir menu, dir dl,
menu ul, 菜單ol, 菜單目錄, 菜單菜單, 菜單dl,
menu ul, 菜單ol, 菜單目錄, 菜單菜單菜單, 菜單dl,
dl ul, dl ol, dl 目錄、dl 選單、dl dl {
margin-top: 0;
邊距底部:0;
}
/* 2 個深度無序列表距底部:0;
}
/* 2 個深度無序列表使用圓*/
ol ul, ul ul, menu ul, dir ul,
ol menu, ul menu, menu menu, dir menu,
ol 目錄、ul 目錄、選單目錄、dir 目錄{
列表樣式類型:圓;
}
/* 3 個深(或更多)無序列表使用正方形*/
ol ol ul, ol ul ul, ol menu ul, ol dir ul,
ol ol menu, ol ul菜單,ol 菜單菜單,ol dir 菜單,
ol ol dir,ol ul dir,ol 菜單目錄,ol dir dir,
ul ol ul,ul ul ul ,ul menu ul,ul dir ul,


ul ol 選單, ul ul 選單, ul 選單選單, ul dir 選單,
ul ol dir, ul ul dir, ul 選單目錄, ul dir dir,
菜單ol ul, 菜單ul ul, 菜單菜單ul , 菜單目錄ul,
菜單ol 菜單, 菜單ul 菜單, 菜單菜單菜單, 菜單目錄菜單,
菜單ol 目錄, 菜單ul 目錄, 菜單菜單目錄,菜單目錄dir,
目錄ol ul, dir ul ul, dir menu ul, dir dir ul,
dir ol 菜單, dir ul 菜單, dir 菜單菜單, dir dir 菜單,
dir ol dir, dir ol dir ul dir, dir 選單dir, dir dir dir {
列表樣式類型:方形;
}
/* leafs */
/*
noshade 和color 屬性完全由
* nsHTMLHRElement 屬性對應代碼
*/
hr {
處理顯示:區塊;
高度:2px;
邊框:1px 插入;
保證金:0.5em 自動🎜>顏色:灰色;
-moz-float-edge:邊距框;
-moz-box-sizing:邊框框;
}
hr[size="1"] {
邊框樣式:solid none none none;
} *|*:-moz-any-link img, img[usemap], object[usemap] { 邊框:2px 實心; } img:-moz-broken::之前,輸入:-moz-broken::之前,img:-moz-user-disabled::之前,輸入:-moz-user-disabled ::之前,img:-moz-loading::之前,輸入:-moz-loading::之前,小程式:-moz-empty- except-children-with-localname(param):-moz -broken ::之前, 小程式:-moz-empty- except-children-with-localname(param):-moz-user-disabled::之前{ 內容:-moz-alt-content !重要; unicode-bidi:嵌入; }
物件:-moz-broken > *|*,小程式:-moz-broken > *|*
物件:-moz-user-disabled > *|*,小程式:-moz-user- disabled > *|* {
/*
繼承物件的對齊方式,這樣如果我們沒有明確對齊
我們將在垂直方向上到達正確的位置。請參閱 bug 36997。請注意,這個
並不重要,因為我們可能會明確對齊。
*/
垂直對齊:繼承;
}
img:-moz-suppressed, 輸入:-moz-suppressed, 物件:-moz-suppressed,
嵌入:-moz-suppressed , applet:-moz-suppressed {
/*
也設定可見性,以防頁面變更顯示。請注意,一般來說,如果我們發現
display:none 破壞了太多佈局,我們_可能_
只想設定可見性而不顯示。如果我們決定確實希望
人們能夠右鍵單擊被阻止的圖像等,我們需要設定
兩者都不是,並破解繪畫代碼.... :(
*/
顯示:無!重要;
溢出:-moz-hidden-unscrollable;
浮動:不重要;🎜>}
frame {
邊框:無
}
iframe {
邊框:無
}
iframe {
邊框: 2px 插入;
noframes {
顯示:無;
}
spacer {
位置:靜態! -moz-user-select:無; >}
/* 可聚焦內容:任何帶有tabindex >=0 的內容都是可聚焦的*/
abbr:focus, acronym:focus, address:focus , applet:focus, b:focus,
base:focus , big:focus, blockquote:focus, br:focus, canvas:focus, title:focus,
center:focus, cite:focus, code:focus , col:focus, colgroup:focus, dd:focus,
del:焦點,dfn:焦點,dir:焦點,div:焦點,dl:焦點,dt:焦點,em:焦點,
字段集:焦點,字體:焦點,形式:焦點,h1:焦點,h2:焦點,h3:焦點,h4:焦點,
h5:焦點,h6:焦點,hr:焦點,i:焦點,img:焦點,ins :焦點,
kbd:焦點,標籤:焦點,圖例: focus, li:focus, link:focus, menu:focus,
object:focus, ol:focus, p:focus, pre:focus, q :focus, s:focus, samp:focus,
small:焦點,跨度:焦點,罷工:焦點,強:焦點,子:焦點,sup:焦點,
表:焦點,tbody:焦點,td :焦點,tfoot:焦點,th:焦點,thead:焦點,
tr:focus, tt:focus, u:focus, ul:focus, var:focus {
/* 不要指定輪廓顏色,我們應該始終使用初始值。 */
輪廓:1px 點線;
}
/* 隱藏元素*/
area、base、basefont、head、meta、script、style、title、
noembed、param {
display: none;
}
/* 模擬非標準HTML
標籤*/
marquee {
width: -moz-available;
顯示:內聯區塊;
垂直對齊:文字底部;
文字對齊:開始;
-moz-binding: url('chrome://xbl-marquee/content/xbl-marquee.xml#marquee-horizo​​ntal ');
}
marquee[direction="up"], marquee[direction="down"] {
-moz-binding: url('chrome://xbl-marquee/content/xbl -marquee. xml#marquee-vertical');
高度:200px;
}
/* 遵循僅列印規則*/ @media print {
marquee { -moz-binding: none; }
/* XXX 這不是必需的,我們應該停止在列印預覽中閃爍任何類型的
,而不僅僅是
元素*/
blink {
text-decoration : none ;
}
}

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn