CSS是一種優化web頁面設計的編程語言。它可以讓開發者們輕松地對各種元素,如文字、圖片、背景等進行樣式設置。以下是CSS中所有元素的列表:
/* 聲明 */ @charset @font-face @import @media @namespace /* 選擇器 */ * [type = "text"] :first-letter :before :after :lang :not :active :hover :focus :checked :empty :enabled :disabled :target :first-child :last-child :nth-child(n) :nth-last-child(n) :only-child :first-of-type :last-of-type :nth-of-type(n) :nth-last-of-type(n) :only-of-type :root :link :visited :default /* 值 */ !important initial inherit unset /* 屬性 */ align-content align-items align-self animation animation-name animation-duration animation-timing-function animation-delay animation-iteration-count animation-direction animation-fill-mode animation-play-state backface-visibility background background-attachment background-color background-image background-position background-repeat background-size border border-collapse border-color border-spacing border-style border-width bottom box-shadow box-sizing caption-side clear clip color column-count column-gap column-rule column-rule-color column-rule-style column-rule-width column-span column-width content counter-increment counter-reset cursor direction display empty-cells filter flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap float font font-family font-size font-size-adjust font-stretch font-style font-variant font-weight height justify-content left letter-spacing line-height list-style list-style-image list-style-position list-style-type margin margin-bottom margin-left margin-right margin-top max-height max-width min-height min-width opacity order outline outline-color outline-offset outline-style outline-width overflow overflow-x overflow-y padding padding-bottom padding-left padding-right padding-top page-break-after page-break-before page-break-inside perspective perspective-origin position quotes resize right table-layout text-align text-align-last text-decoration text-indent text-justify text-transform top transform transform-origin transform-style transition transition-property transition-duration transition-timing-function transition-delay unicode-bidi vertical-align visibility white-space width word-break word-spacing word-wrap writing-mode z-index
以上是CSS的所有元素,其中有些極少使用,但是對提高開發效率、實現某些特效是非常有幫助的。