這個代碼怎么用?body { font-family:Verdana; font-size:14px; margin:0; line-height:150%;}#container {margin:0 auto; width:900px;}#header { height:100px; background:#6cf; margin-bottom:5px;}#menu { height:30px; background:#09c; margin-bottom:5px;}#mainContent {}#sidebar { float:right; width:200px; background:#9ff; margin-bottom:5px;}#content { float:left; width:675px; padding:10px; background:#cff; margin-bottom:5px;}/*因為是固定寬度,采用左右浮動方法可有效避免ie 3像素bug*/#footer { height:60px; background:#6cf;}.clearfloat { clear:both; height:0; font-size: 1px; line-height: 0px;}
2 回答

ibeautiful
TA貢獻1993條經(jīng)驗 獲得超6個贊
有兩種:
1.就是直接在HTML里面寫,在<head></head>之后加上<style>在這里面輸入css代碼</style>就行
2.就是外部載入css文件,所以要在<head>后寫<link rel="stylesheet" type="text/css" href="style.css" />你的css名稱現(xiàn)在定義為style,所以就叫style.css
顯然你所說的就是第二種方式了。
- 2 回答
- 0 關注
- 699 瀏覽
添加回答
舉報
0/150
提交
取消