一段css講解協助瞭解css

來源:互聯網
上載者:User

body{color:#666666;font: 12px arial,"宋體";}/*這裡定義了整個頁面通用的字型的大小、字型、及顏色;*/
a:link,a:visited{color:#666666; text-decoration:none;}/*定義了所有連結(也就是a標籤)的通常及訪問過一次以後兩種情況的樣式,變化顏色及去掉底線*/
a:hover{color:#ff0000;}/*定義了所有連結滑鼠經過的樣式,字型顏色變化*/
/*頭區*/
.header {margin:0 auto; width:1003px;background:url (http://pigimg.zhongso.com/space/gallery/%E4%BC%81%E4%B8%9A%E5%BD%A2% E8%B1%A1%E5%AE%A3%E4%BC%A0%E5%9E%8B/header.jpg) repeat; position:relative;}/*這個樣式連結了一張圖片,並且在設定的寬和高內重複填充,margiin:0 atuo表示相對於外層置中*/
.logo { float:left; position:relative; left:20px; top:5px;display:none}/*logo圖片位置;向左浮動、相對定位、而且還隱藏了,看不見噢。*/
.search { float:right;position:relative; right:0px; top:6px; }/*和上邊logo層並排,因為他像右浮動了*/
.search input{margin-right:5px; height:16px; width:183px; background:#ffffff; border:1px #dbe0e6 solid}/*一個文字框的樣式,白色背景,有邊線,距右邊5像素*/
.ssbtn{ float:left; width:38px;height:20px;background: url (http://i0.zhongso.com/skin/company/appearance/search.gif) no-repeat center;}/*搜尋按鈕,沒什麼特別的*/
.ssmore{float:left; width:38px;height:20px; background:url (http://i0.zhongso.com/skin/company/appearance/more.gif) no-repeat center;margin:0px 5px;}/*更多按鈕,沒什麼特別的*/
.nav{ float:right; position:relative; right:5px; top:10px; text- align:right;}/*頂部右側文字,又用了相對定位,裡面字型居右*/
.titblo { position:relative;left:100px;top:60px; margin-bottom:100px; width:400px;} /*頁名稱和網址地區位置,還是相對定位,不知道為什麼這麼用,距底部100px*/
.name{ font:bold 30px/30px "黑體";border:0; background:transparent;text-align:right; width:20em;filter:shadow (color=#ffffff,direction=120,strength=3);}/*這裡有點花頭,用了個背景圖片跟隨滑鼠,還用了濾鏡,貌似陰影,ie特有的屬性,不建議你用*/
.url{background:transparent;width:480px;padding:3px; color:#000000;visibility:hidden}/*頁網址,使用了隱藏,這個隱藏看不見,但是佔用空間*/
/*標籤區*/
.tags {padding:0 10px 0 6px; width:987px;text-align: center;margin:2px auto; background:url (http://i0.zhongso.com/skin/company/appearance/tag.gif) repeat-x;}/*記住padding的順序是上右下左*/
.tags li{ float:left; display:block; cursor:pointer;/*滑鼠形狀*/margin:0 3px;height:22px;white-space: nowrap/*這個好像是強制文本一行顯示*/ ;}
.tag{ padding-top:10px;}/*非當前頁標籤狀態*/
.tag a:link,.tag a:visited{color:#ffffff;text-decoration:none; font- weight:bold;} /*tag內的連結樣式,只對tag內的連結有用*/


相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.