为了账号安全,请及时绑定邮箱和手机立即绑定

CSS代码怎么用?放哪?

CSS代码怎么用?放哪?

慕桂英546537 2019-02-15 11:18:58
这个代码怎么用?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;}
查看完整描述

1 回答

?
扬帆大鱼

TA贡献1799条经验 获得超9个赞

有两种:
1.就是直接在HTML里面写,在<head></head>之后加上<style>在这里面输入css代码</style>就行
2.就是外部载入css文件,所以要在<head>后写<link rel="stylesheet" type="text/css" href="style.css" />你的css名称现在定义为style,所以就叫style.css

显然你所说的就是第二种方式了。

查看完整回答
反对 回复 2019-02-17
  • 1 回答
  • 0 关注
  • 615 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信