## content 屬性
### 屬性定義及使用說明
ontent 屬性與 :before 及 :after 偽元素配合使用,來插入生成內容。
JavaScript 語法:object.style.content="url(beep.wav)"
* * *
## Content屬性值
| 值 | 說明 |
| :-- | :-- |
| none | 設置Content,如果指定成Nothing |
| normal | 設置content,如果指定的話,正常,默認是"none"(該是nothing) |
| counter | 設定計數器內容 |
| attr*(attribute)* | 設置Content作為選擇器的屬性之一。 |
| *string* | 設置Content到你指定的文本 |
| open-quote | 設置Content是開口引號 |
| close-quote | 設置Content是閉合引號 |
| no-open-quote | 如果指定,移除內容的開始引號 |
| no-close-quote | 如果指定,移除內容的閉合引號 |
| url(*url*) | 設置某種媒體(圖像,聲音,視頻等內容) |
| inherit | 指定的content屬性的值,應該從父元素繼承 |
* * *
## 實例--在每個鏈接后的括號內加上網址:
```
<!DOCTYPE html>
<html>
<head>
<style>
a:after {content: " (" attr(href) ")";}
</style>
</head>
<body>
<p><a href="http://www.w3cschool.cn">w3cschool</a> contains free tutorials and references.</p>
<p><b>Note:</b> IE8 supports the content property only if a !DOCTYPE is specified.</p>
</body>
</html>
```
- CSS常用樣式控制
- background--背景
- Text--文本
- CSS屬性
- align-*
- animation-*
- appearance
- backface-visibility
- background
- background-attachment
- background-blend-mode
- background-clip
- background-color
- background-image
- background-origin
- background-position
- background-repeat
- background-size
- border
- border-bottom
- border-bottom-color
- border-bottom-left-radius
- border-bottom-right-radius
- border-bottom-style
- border-bottom-width
- border-collapse
- border-color
- border-image
- border-image-outset
- border-image-repeat
- border-image-source
- border-image-width
- Border-left
- border-left-color
- border-left-style
- border-left-width
- border-image-slice
- border-radius
- border-right
- border-right-color
- border-right-style
- border-right-width
- border-spacing
- 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-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
- columns
- content
- counter-increment
- counter-reset
- cursor
- direction
- display
- Empty-cells
- filter(濾鏡)
- CSS 偽元素選擇器
- :active 選擇器
- :after 選擇器
- :before 選擇器
- :checked 選擇器
- :disabled 選擇器
- :empty 選擇器
- :enabled 選擇器
- :first-child 偽元素
- :first-letter 偽元素
- :first-line 偽元素
- :first-of-type 選擇器
- :focus 選擇器
- :hover 選擇器