選單
×
   ❮   
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

CSS 參考手冊

CSS 參考手冊 CSS 瀏覽器支援 CSS 選擇器 CSS 偽元素 CSS 組合器 CSS 函式 CSS 參考手冊(聽覺) CSS 網路安全字型 CSS 備用字型 CSS 可動畫屬性 CSS 單位 CSS PX-EM 轉換器 CSS 顏色 CSS 顏色值 CSS 預設值 CSS 實體

CSS 屬性

accent-color align-content align-items align-self all animation animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state animation-timing-function aspect-ratio backdrop-filter backface-visibility background background-attachment background-blend-mode background-clip background-color background-image background-origin background-position background-position-x background-position-y background-repeat background-size block-size border border-block border-block-color border-block-end border-block-end-color border-block-end-style border-block-end-width border-block-start border-block-start-color border-block-start-style border-block-start-width border-block-style border-block-width border-bottom border-bottom-color border-bottom-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border-collapse border-color border-end-end-radius border-end-start-radius border-image border-image-outset border-image-repeat border-image-slice border-image-source border-image-width border-inline border-inline-color border-inline-end border-inline-end-color border-inline-end-style border-inline-end-width border-inline-start border-inline-start-color border-inline-start-style border-inline-start-width border-inline-style border-inline-width border-left border-left-color border-left-style border-left-width border-radius border-right border-right-color border-right-style border-right-width border-spacing border-start-end-radius border-start-start-radius border-style border-top border-top-color border-top-left-radius border-top-right-radius border-top-style border-top-width border-width bottom box-decoration-break box-reflect box-shadow box-sizing break-after break-before break-inside caption-side caret-color @charset clear clip clip-path color color-scheme column-count column-fill column-gap column-rule column-rule-color column-rule-style column-rule-width column-span column-width columns content counter-increment counter-reset counter-set cursor direction display empty-cells filter flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap float font @font-face font-family font-feature-settings font-kerning font-size font-size-adjust font-stretch font-style font-variant font-variant-caps font-weight gap grid grid-area grid-auto-columns grid-auto-flow grid-auto-rows grid-column grid-column-end grid-column-start grid-row grid-row-end grid-row-start grid-template grid-template-areas grid-template-columns grid-template-rows hanging-punctuation height hyphens hyphenate-character image-rendering @import initial-letter inline-size inset inset-block inset-block-end inset-block-start inset-inline inset-inline-end inset-inline-start isolation justify-content justify-items justify-self @keyframes left letter-spacing line-height list-style list-style-image list-style-position list-style-type margin margin-block margin-block-end margin-block-start margin-bottom margin-inline margin-inline-end margin-inline-start margin-left margin-right margin-top marker marker-end marker-mid marker-start mask mask-clip mask-composite mask-image mask-mode mask-origin mask-position mask-repeat mask-size mask-type max-block-size max-height max-inline-size max-width @media min-block-size min-inline-size min-height min-width mix-blend-mode object-fit object-position offset offset-anchor offset-distance offset-path offset-position offset-rotate opacity order orphans outline outline-color outline-offset outline-style outline-width overflow overflow-anchor overflow-wrap overflow-x overflow-y overscroll-behavior overscroll-behavior-block overscroll-behavior-inline overscroll-behavior-x overscroll-behavior-y padding padding-block padding-block-end padding-block-start padding-bottom padding-inline padding-inline-end padding-inline-start padding-left padding-right padding-top page-break-after page-break-before page-break-inside paint-order perspective perspective-origin place-content place-items place-self pointer-events position @property quotes resize right rotate row-gap scale scroll-behavior scroll-margin scroll-margin-block scroll-margin-block-end scroll-margin-block-start scroll-margin-bottom scroll-margin-inline scroll-margin-inline-end scroll-margin-inline-start scroll-margin-left scroll-margin-right scroll-margin-top scroll-padding scroll-padding-block scroll-padding-block-end scroll-padding-block-start scroll-padding-bottom scroll-padding-inline scroll-padding-inline-end scroll-padding-inline-start scroll-padding-left scroll-padding-right scroll-padding-top scroll-snap-align scroll-snap-stop scroll-snap-type scrollbar-color tab-size table-layout text-align text-align-last text-decoration text-decoration-color text-decoration-line text-decoration-style text-decoration-thickness text-emphasis text-emphasis-color text-emphasis-position text-emphasis-style text-indent text-justify text-orientation text-overflow text-shadow text-transform text-underline-offset text-underline-position top transform transform-origin transform-style transition transition-delay transition-duration transition-property transition-timing-function translate unicode-bidi user-select vertical-align visibility white-space widows width word-break word-spacing word-wrap writing-mode z-index zoom



CSS 預設值參考


HTML 元素的預設 CSS 值

下表顯示了所有 HTML 元素的預設 CSS 瀏覽器值。

元素 預設 CSS 值 試一試
a:link 顏色:(內部值);
文字修飾:下劃線;
游標:自動;
試一試 »
a:visited 顏色:(內部值);
文字修飾:下劃線;
游標:自動;
試一試 »
a:link:active 顏色:(內部值);
試一試 »
a:visited:active 顏色:(內部值);
試一試 »
abbr 無。
address 顯示:塊;
字型樣式:斜體;
試一試 »
area 顯示:無;
文章 顯示:塊;
旁白 顯示:塊;
音訊 無。
b 字型粗細:粗體; 試一試 »
base 無。
bdi 無。
bdo unicode-bidi:bidi-override;
blockquote 顯示:塊;
外邊距頂部:1em;
外邊距底部:1em;
外邊距左側:40px;
外邊距右側:40px;
試一試 »
body 顯示:塊;
外邊距:8px;
試一試 »
body:focus 輪廓:無; 試一試 »
br 無。
button
canvas 無。
標題 顯示:table-caption;
文字對齊:居中;
試一試 »
cite 字型樣式:斜體; 試一試 »
程式碼 字體系列:等寬字型; 試一試 »
col 顯示:table-column; 試一試 »
colgroup 顯示:table-column-group 試一試 »
datalist 顯示:無;
dd 顯示:塊;
外邊距左側:40px;
試一試 »
del 文字修飾:刪除線; 試一試 »
詳情 顯示:塊;
dfn 字型樣式:斜體; 試一試 »
dialog 無。
div 顯示:塊; 試一試 »
dl 顯示:塊;
外邊距頂部:1em;
外邊距底部:1em;
外邊距左側:0;
外邊距右側:0;
試一試 »
dt 顯示:塊; 試一試 »
em 字型樣式:斜體; 試一試 »
embed:focus 輪廓:無;
fieldset 顯示:塊;
外邊距左側:2px;
外邊距右側:2px;
內邊距頂部:0.35em;
內邊距底部:0.625em;
內邊距左側:0.75em;
內邊距右側:0.75em;
邊框:2px 凹槽 (內部值);
試一試 »
figcaption 顯示:塊;
figure 顯示:塊;
外邊距頂部:1em;
外邊距底部:1em;
外邊距左側:40px;
外邊距右側:40px;
試一試 »
頁尾 顯示:塊;
form 顯示:塊;
外邊距頂部:0em;
試一試 »
h1 顯示:塊;
字型大小:2em;
外邊距頂部:0.67em;
外邊距底部:0.67em;
外邊距左側:0;
外邊距右側:0;
字型粗細:粗體;
試一試 »
h2 顯示:塊;
字型大小:1.5em;
外邊距頂部:0.83em;
外邊距底部:0.83em;
外邊距左側:0;
外邊距右側:0;
字型粗細:粗體;
試一試 »
h3 顯示:塊;
字型大小:1.17em;
外邊距頂部:1em;
外邊距底部:1em;
外邊距左側:0;
外邊距右側:0;
字型粗細:粗體;
試一試 »
h4 顯示:塊;
外邊距頂部:1.33em;
外邊距底部:1.33em;
外邊距左側:0;
外邊距右側:0;
字型粗細:粗體;
試一試 »
h5 顯示:塊;
字型大小:.83em;
外邊距頂部:1.67em;
外邊距底部:1.67em;
外邊距左側:0;
外邊距右側:0;
字型粗細:粗體;
試一試 »
h6 顯示:塊;
字型大小:.67em;
外邊距頂部:2.33em;
外邊距底部:2.33em;
外邊距左側:0;
外邊距右側:0;
字型粗細:粗體;
試一試 »
head 顯示:無;
header 顯示:塊;
hr 顯示:塊;
外邊距頂部:0.5em;
外邊距底部:0.5em;
外邊距左側:auto;
外邊距右側:auto;
邊框樣式:inset;
邊框寬度:1px;
試一試 »
html 顯示:塊;
html:focus 輪廓:無;
i 字型樣式:斜體; 試一試 »
iframe:focus 輪廓:無;
iframe[seamless] 顯示:塊;
img 顯示:inline-block; 試一試 »
input 無。
ins 文字修飾:下劃線; 試一試 »
kbd 字體系列:等寬字型; 試一試 »
標籤 游標:default; 試一試 »
legend 顯示:塊;
內邊距左側:2px;
內邊距右側:2px;
邊框:無;
試一試 »
li 顯示:list-item;
連結 顯示:無;
main 無。
地圖 顯示:inline;
mark 背景顏色:yellow;
顏色:black;
試一試 »
選單 顯示:塊;
列表樣式型別:disc;
外邊距頂部:1em;
外邊距底部:1em;
外邊距左側:0;
外邊距右側:0;
內邊距左側:40px;
menuitem 無。
meta 無。
meter 無。
nav 顯示:塊;
noscript 無。
object:focus 輪廓:無;
ol 顯示:塊;
列表樣式型別:decimal;
外邊距頂部:1em;
外邊距底部:1em;
外邊距左側:0;
外邊距右側:0;
內邊距左側:40px;
試一試 »
optgroup 無。
option 無。
output 顯示:inline;
p 顯示:塊;
外邊距頂部:1em;
外邊距底部:1em;
外邊距左側:0;
外邊距右側:0;
試一試 »
param 顯示:無;
picture 無。
pre 顯示:塊;
字體系列:等寬字型;
white-space:pre;
外邊距:1em 0;
試一試 »
progress 無。
q 顯示:inline; 試一試 »
q::before 內容:open-quote; 試一試 »
q::after 內容:close-quote; 試一試 »
rp 無。
rt 行高:normal;
ruby 無。
s 文字修飾:刪除線; 試一試 »
samp 字體系列:等寬字型; 試一試 »
script 顯示:無;
section 顯示:塊; 試一試 »
select 無。
small 字型大小:smaller; 試一試 »
source 無。
span 無。
strike 文字修飾:刪除線; 試一試 »
strong 字型粗細:粗體; 試一試 »
樣式 顯示:無;
sub(下標) 垂直對齊:sub;
字型大小:smaller;
試一試 »
summary 顯示:塊;
sup 垂直對齊:super;
字型大小:smaller;
試一試 »
table 顯示:table;
邊框合併:separate;
邊框間距:2px;
邊框顏色:gray;
試一試 »
tbody 顯示:table-row-group;
垂直對齊:middle;
邊框顏色:inherit;
td 顯示:table-cell;
垂直對齊:inherit;
template 無。
textarea 無。
tfoot 顯示:table-footer-group;
垂直對齊:middle;
邊框顏色:inherit;
th 顯示:table-cell;
垂直對齊:inherit;
字型粗細:粗體;
文字對齊:居中;
thead 顯示:table-header-group;
垂直對齊:middle;
邊框顏色:inherit;
time 無。
title 顯示:無;
tr 顯示:table-row;
垂直對齊:inherit;
邊框顏色:inherit;
track 無。
u 文字修飾:下劃線; 試一試 »
ul 顯示:塊;
列表樣式型別:disc;
外邊距頂部:1em;
外邊距底部:1em;
外邊距左側:0;
外邊距右側:0;
內邊距左側:40px;
試一試 »
var 字型樣式:斜體; 試一試 »
影片 無。
wbr 無。

×

聯絡銷售

如果您想將 W3Schools 服務用於教育機構、團隊或企業,請傳送電子郵件給我們
sales@w3schools.com

報告錯誤

如果您想報告錯誤,或想提出建議,請傳送電子郵件給我們
help@w3schools.com

W3Schools 經過最佳化,旨在方便學習和培訓。示例可能經過簡化,以提高閱讀和學習體驗。教程、參考資料和示例會不斷審查,以避免錯誤,但我們無法保證所有內容的完全正確性。使用 W3Schools 即表示您已閱讀並接受我們的使用條款Cookie 和隱私政策

版權所有 1999-2024 Refsnes Data。保留所有權利。W3Schools 由 W3.CSS 提供支援