@charset "utf-8"; /*視窗背景色設定(擇一)*/ @import url(http://fonts.googleapis.com/earlyaccess/cwTeXKai.css); body{ background-color:#fbf9cc ; } /*連結顏色設定*/ a{ color: blue; } 常見設定四種狀態之項目,建議預設即可。text-decoration:none是設定無底線,並不限定超連結,限所有文字底線等表達方式 a:link{ color: blue; text-decoration: none; } a:visited{ color: blueviolet; } a:hover{ color: red; } a:active{ color: yellow; } /*頁首,導覽,頁尾的共通設定*/ header , nav , footer{ text-align: center; } header { background-color: white; } /*導覽樣式設定*/ li{ /* border: 1px solid red; 設定完a後拿掉,功用已失*/ list-style-type: none; /*項目符號去除*/ display: inline-block; /*項目改成水平排列*/ width: 100px; margin: 0 10px; } li a { color: white; background-color: #16d45f; display: block; /*如此才能將a當成區塊元素,被景色才能占滿區塊 */ text-decoration: none; padding: 10px; border-radius: 10px; } /*頁面標題設定*/ h1{ color: white; background-color:#59a987; /*width: 300px; */ margin:35px auto; padding: 30px; border:#98dbbd 5px solid; box-sizing: border-box; font-size: 250%; font-family: 'cwTeXKai', serif; line-height: 1.3em; border-radius: 25% ; background: linear-gradient(to bottom,#6db998,#4ea17d); text-shadow: 3px 3px #e6dfd6 ; box-shadow: 1px 1px 1px 1px #beb291; } p{ font:bold 1.8em/1.5em 標楷體; } /*小標題設定*/ /*內容區塊邊框設定*/ main{ background-image: url(./images/3.jpg); background-color: white; width: 80%; margin: 40px auto; border: 1px solid #f4e3dc; padding: 40px 60px; box-sizing: border-box; }