CSS學習筆記——一些之前被本身忽視的屬性

一、HTML 和 CSS 顏色規範中定義了 147 中顏色名(17 種標準顏色加 130 種其餘顏色)。 http://www.w3school.com.cn/cssref/css_colornames.asp (link裏面列出了這些顏色)css

二、css的尺寸(http://www.baidu.com/s?wd=%E8%8B%B1%E5%AF%B8 能夠查查): 單位 描述 % 百分比 in 英寸 cm 釐米 mm 毫米 em 1em 等於當前的字體尺寸。 2em 等於當前字體尺寸的兩倍。 例如,若是某元素以 12pt 顯示,那麼 2em 是24pt。 在 CSS 中,em 是很是有用的單位,由於它能夠自動適應用戶所使用的字體。 ex 一個 ex 是一個字體的 x-height。 (x-height 一般是字體尺寸的一半。) pt 磅 (1 pt 等於 1/72 英寸) pc 12 點活字 (1 pc 等於 12 點) px 像素 (計算機屏幕上的一個點)web

三、css裏面的屬性(http://www.w3school.com.cn/cssref/index.asp#) 高級使用會用到的屬性:瀏覽器

//有兩個冒號的狀況 ::selection 選擇器匹配被用戶選取的選取是部分。(http://www.w3school.com.cn/cssref/selector_selection.asp)字體

@keyframes 規定動畫。 animation 全部動畫屬性的簡寫屬性,除了 animation-play-state 屬性。 animation-name 規定 @keyframes 動畫的名稱。 animation-duration 規定動畫完成一個週期所花費的秒或毫秒。 animation-timing-function 規定動畫的速度曲線。 animation-delay 規定動畫什麼時候開始。 animation-iteration-count 規定動畫被播放的次數。 animation-direction 規定動畫是否在下一週期逆向地播放。 animation-play-state 規定動畫是否正在運行或暫停。 animation-fill-mode 規定對象動畫時間以外的狀態。動畫

由於瀏覽器的不一樣,display參數不一樣 div { width:350px; height:100px; border:1px solid black;ssr

/* Firefox */ display:-moz-box; -moz-box-orient:horizontal;對象

/* Safari、Opera 以及 Chrome */ display:-webkit-box; -webkit-box-orient:horizontal;get

/* W3C */ display:box; box-orient:horizontal; }animation

在不一樣設備上顯示不一樣: @media screen { p.test {font-family:verdana,sans-serif; font-size:14px} }it

@media print { p.test {font-family:times,serif; font-size:10px} }

@media screen,print { p.test {font-weight:bold} }

相關文章
相關標籤/搜索