CSS
CSS ?? ??? ???????
(1) IE ?? ??? ?? W3C ?? ??? ? ?? ??? ????. IE? ??? ???? ???? ??? ?????.
(2) ?? ??: ???, ??, ??, ???.
CSS ???? ?? ??? ???? ? ???? ???? ????? ??? ?????? CSS3? ??? ?? ???? ??????
* 1. id ??? (# myid)
2. ??? ??? (.myclassname)
3. ?? ??? (div, h1, p)
4. ?? ??? (h1 + p)
5. ?? ??? (ul < ; li)
6. ?? ???(li a)
7. ????? ???(*)
8. ?? ???(a[rel = "external"])
9. ?? ??? ?? ????(a: hover, li: n?? - ??)
* ?? ??? ???: ?? ?? ?? ?? ??, UL LI DL DD DT;
* ?? ???? ???: ??? ?? ?? ?? ??;
* ???? ??, ?? ??? ??? ??? ?????.
* ?? ???? ????? ??? ??? ????.
CSS3???. ??? ?? ??? ?:
p:last-of-type? ?? ??? ??? <p> ??? ?? ?????.
p:only-of-type? ?? ??? ??? <p> ??? ?????.p:only-child ?? ??? ??? ?? ??? ? <p> ??? ?????.
p:nth-child(2) ?? ??? ? ?? ??? ? <p> ??? ?????.
:enabled :disabled? ?? ???? ???? ??? ?????.
:checked ??? ???? ????? ???? ????.
div? ??? ???? ??? ?????? ?? ??? ??? ???? ??? ??????
width:200px;
margin:0 auto; }
??? ?? ??? ??
????? ??, ??, 500 ? ?? 300 ??? ??
???? ?? ?? ??
.div {
Width:500px; height:300px;//?? ?? ??
Margin: -150px 0 0 - 250px;
position :relative; ?? ??
background-color:pink;//??? ?? ????
left:50%;
top:50%;
}
?? ?? ???? ?????. ??. ??, ?? ? ?? ?? ?? ??? ?? ??????
1.
??? ??? ???? ?????.
???? ????. ??? ?? ???? ?????.
inline-block? ??? ???? ????? ??? ??? ???? ?????.
list-item? ??? ???? ???? ??? ?? ???? ?????.
2.
*??
?? ?? ??? ?? ? ?? ?? ??? ???? ??? ??? ?? ?? ??? ?????.
*???(?? IE? ???? ??)
???? ?? ???? ?? ??? ?? ??? ?????.
*relative
? ? ? ?? ??? ???? ????? ??? ??? ?????.
* ?? ???. ?? ??? ??? ??? ?? ??
*?? ?????(??, ??, ??, ??? Z-??? ??? ???).
* ??? ?? ???? ?? ?? ?? ????? ?????.
CSS3? ??? ??? ??????
CSS3? ?? ???(border-radius:8px), ???(box-shadow:10px)? ?????.
???? ?? ?? ??(text-shadow,), ?? ?????(gradient), ??(transform)
??:?? ( 9deg) scale(0.85,0.90)translate(0px,-30px)skew(-9deg,0deg);//??, ?? ??, ?? ??, ???
? ?? CSS ??? ?? ?? ?? rgba
?? ??
?? ??? CSS? ???? ?????? ??? ?????
CSS ???? ????? ??.
- ???? ??? ??? ?? ?? ??? ?? ?????? ???? ????. CSS? ????? ??? ???? ?? ??? ?? ??? ?? ?????.
- ?? ??? ???? SEO? ?? ?? ??? ????? ???? ?? ?? ?? ??? ???? ???? ?????? ?????.
*?? ??? ??? ??? ??? ????: * {padding: 0; margin: 0;} (???? ??)
Taobao ??? ???:
body, h1, h2, h3, h4, h5, h6, hr, p , blockquote , dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, ??, ??, ??? ??, th, td { margin:0 }
body, ??, ??, ?? , ??? ??; { ??:12px/1.5tahoma, arial, 5b8b4f53; }
h1, h2, h3, h4, h5, h6{ ?? ??:100% }
address, cite, dfn, em, var { ?? ???:normal ; }
code, kbd, pre, samp { ?? ???:couriernew, courier, monospace }
small{ ?? ??:12px }
ul, ol { ?? ???: ?? }
a { :none; fieldset, img { border:0 }
button, input, select, textarea { ?? ??:100% }
table { border-collapse:collapse:0 }
absolute ?? ??? ?? ??? ???? ?? ??? ??????
??, ??, ?? ??, ????, ??? ??? ?? ???? ??? ????
css? ?? ??? ???
??? ???? ?? ?????. Weight? 1, ???? ???? 10, id? ???? 100???. ?? ???? ??? ??? ??? ?? ?????.
div{
}/* ???? 10*/
.class1{
}
/*???? 100*/
#id1{
}
/*???? 100+1=101*/
#id1 div{
}
/* ???? 10+1=11* /
.class1 div{
}
/*???? 10+10+1=21*/
.class1 .class2 div{
}
???? ???, ????? ??? ???? ????? ?? ??? ???. ?? ??? ?????
float? ?? ??? ????????? ?? ??? ??? ?
??? ????? ??? ??? ??? ? ?? ????
歡迎選擇我的課程,讓我們一起見(jiàn)證您的進(jìn)步~~