HTML+CSS CSS? ?? ?? ???? ?? ?? ??
?? CSS? ?? ??? ?? ???????.
?? ??? ?? CSS?? ??? ???? ??? ??? ???.
/*?? ??*/
??: ??
??? ?? ?? ??? ????:
?? ?? ?? ?? ?? ?? ?? ??? ?? ??? ???? ?? ??? ?? ?? ?? ??? ?? ? ??
?? ?? ???????.
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <style type="text/css"> body{ font-size: 20px; /*字體大小*/ color: red; /*字體顏色*/ font-weight: bold; /*字體粗細(xì)*/ font-style: oblique; /*italic:斜體。對(duì)于沒(méi)有斜體變量的特殊字體,將應(yīng)用 oblique normal:默認(rèn)值。正常的字體 oblique傾斜的字體 */ text-decoration:none; /*none : 默認(rèn)值。無(wú)裝飾 blink : 閃爍 underline : 下劃線 line-through : 貫穿線 overline : 上劃線 */ font-family:隸書(shū); /*什么樣的字體。宋體,隸書(shū)等*/ } </style> </head> <body> 中華名族偉大復(fù)興 </body> </html>
??? ???
??? ?? ??? ??
rreee??
?? ?? ??? ?? ??? ?? ???
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <style type="text/css"> body{ text-align:center; } </style> </head> <body> 中華名族偉大復(fù)興 </body> </html>
??
?? ?? ?? height
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <style type="text/css"> body{ background-color:red; background-image:url("1.jpg"); } </style> </head> <body> 中華名族偉大復(fù)興 </body> </html>
margin and padding
margin ?? ??? ??? ??? ???? ?? ??? ?????. ? ??? 1~4?? ?? ?? ? ????. <<>
?? ??? 10px???.
>
??? ??? 15px ?? ??? 20pxpadding ?? ??? ??? ??? ?? ?? ??? ?????. ? ??? 1~4?? ?? ?? ? ????. ??: 10px 5px 15px 20px; ??>?? ??? 20px??: 4?? ???? ? ???? ???? ?? ?? ???? 0px?????? ??????? ??? ?? ??border:1px solid red ????? ?????. 1???? ?? ??????<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <style type="text/css"> div{ background-color: red; width: 100px; height:100px; } </style> </head> <body> <div></div> </body> </html>??? ???? ??? ????. div ?? ??? ?? ???? ???? ???? ??? ??? ?? ????? div? CSS? ? ?? ???? ???? ???. text-align: center; line-height: 150px;