一.簡(jiǎn)介
前端三層:
三層 | 全稱 | 描述 |
---|---|---|
HTML | 超文本標(biāo)記語言 | 從語義的角度描述頁面結(jié)構(gòu)。 |
CSS | 層疊式樣式表 | 從審美的角度負(fù)責(zé)頁面樣式梅垄。 |
JS | JavaScript | 從交互的角度描述頁面行為厂捞。 |
css
是cascading style sheet
層疊式樣式表的簡(jiǎn)寫。
type
表示“類型”队丝, text
就是“純文本”靡馁。css
也是純文本的。
<style type=”text/css”>
</style>
Snip20161108_1.png
二. CSS屬性(*代表常用)
name | 描述 |
---|---|
* background-color: red | 背景顏色為紅色 |
*color:blue | 字體顏色w為藍(lán)色 |
*font-size:30px | 字體大小 size:尺寸 px:像素 |
*font-weight | font:字體 weight:重量 |
*font-style | 斜體:italic 不斜體:normal |
*text-decoration | underline(下劃線) none(沒有下劃線) |
*padding | 內(nèi)邊距(四種方式) |
*margin | 外邊距(四種方式) |
*border | 設(shè)置邊框(border-width炭玫、border-style奈嘿、border-color) |
overflow | 設(shè)置超出元素邊界內(nèi)容的顯示 |
text-indent:2em | em漢字的一個(gè)寬度 |
line-height | 垂直居中 |
cursor | 設(shè)置光標(biāo)的類型 (手指 十字架) |
text-decoration | 設(shè)置a標(biāo)簽的下劃線 |
text-align | 水平居中 |
list-style | 設(shè)置列表左邊編號(hào)的類型,經(jīng)常用 none 顯示類型(none、block吞加、inline裙犹、inline-block) |