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

字体没有发生变化

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>无标题文档</title>

<style type="text/css">

.body{margin:0;padding:0;font-size:50px;color:#FFF}

.top{height:100px;background:#666

}

.main{

height:800px;background:#F00

}

.main_left{width:200px;height:800px;background:#009;float:left}

.main_right{margin-left:210px;height:800px;background:#0F9}

.bottom{height:100px;background:#F9C;clear:both}

</style>

</head>


<body>

<div class="top">top</div>

<div class="main">

<div class="main_left">left</div>

<div class="main_right">right</div>

</div>

<div class="bottom">bottom</div>

</body>

</html>

如上代码,字体大小颜色没有变化,怎么回事

正在回答

1 回答

是不是因为你在body前面加了.,所以body后面的都没用了。把.删了看看

0 回复 有任何疑惑可以回复我~
#1

慕粉1351043510 提问者

非常感谢!
2017-04-14 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
如何用CSS进行网页布局
  • 参与学习       209682    人
  • 解答问题       1153    个

用最简洁的案例教你布局的那些知识,这是前端工程师基本技能

进入课程

字体没有发生变化

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信