CSS代码怎么用?放哪?

这个代码怎么用?
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;}

慕桂英546537
浏览 617回答 1
1回答

扬帆大鱼

有两种:1.就是直接在HTML里面写,在<head></head>之后加上<style>在这里面输入css代码</style>就行2.就是外部载入css文件,所以要在<head>后写<link rel="stylesheet" type="text/css" href="style.css" />你的css名称现在定义为style,所以就叫style.css显然你所说的就是第二种方式了。
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

CSS3