CSS
===========================================
CSS is a rule that tells the browser how to
render a specified tag
type
inline CSS
File CSS
Extended CSS
inline CSS
<h1 style="color:blue;font-style:italic"> //NOTICE :
File CSS
========================================
<style>...</style> in head section
<head>
<style type="text/css" media="screen,print"> // type 统一文件描述 IMG/jpg
<!--
h1{color:blue;font-style:italic}
-->
// or @import(abc.css)
</style>
</head>
========================================
Extended CSS
========================================
========================================
import
link to extended CSS
========================================
<head>
<link rel="stylesheet" type="text/css"
href="URL">
</head>
========================================
Basic grammar of CSS
===========================================
Basic
Selector{property1:value1;property2:value2;property3:value3;...}
Mutil-selector
h1,h2,h3,h4,h5,h6{text-align:center}
===========================================
Selectors in context
===========================================
ol li{list-style:upper-roman}
ol ol li{list-style:upper-alpha}
ol ol ol li{list-style:decimal}
h1 em{color:red}
h1 em,p strong,address{color:blue} //多选择器 & 上下文
===========================================
Special selector通用选择器
* {color:purple}
class of style
===========================================
<style>
<!--
p.abstract{font-style:italic}
-->
</style>
...
<p class=abstract>
...
</p>
===========================================
General class of style
===========================================
.italic{font-style:italic}
<p class=italic>
...
</p>
===========================================
Pseudo-class
===========================================
A.visited{color:blue}
<a href="zzz" class="visited">...</a>
Visited
Link
Active
===========================================
Style attributes
font
color
background
text
frame
set
Value of attributes
keyword: underline,small
Length:1.5CM,+0.25mm,-3pt
percentage
URL: url
color:
aqua,black,blue,fuchsia,gray,green,lime,maroon
Rgb(100%,100%,100%)
Rgb(255,255,255)
#rrggbb //16
#rgb