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

如果不设置高度,而且设置overflow:flow的话里面的字体溢出无法显示

<!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">

*{margin:0;padding:0}

#wrap{width:960px;margin:0px auto;}

#hedder{width:100%;background:#0F0;}

#mainbody{width:100%;background:#F00; overflow:hidden;}

.left{width:800px; background:#96C; float:left;}

.right{width:140px; background:#0FF; float:right}

#fotter{width:100%;background:#666;}

</style>


</head>


<body>

<div id="wrap">

<div id="hedder">hadder</div>

<div id="mainbody">

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

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

    

    </div>

    

<div id="fotter">fotter</div>

</div>


</body>

</html>


正在回答

4 回答

<!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">

*{margin:0;padding:0}

#wrap{width:960px;margin:0px auto;}

#hedder{width:100%;background:#0F0;}

#mainbody{width:100%;background:#F00; overflow:hidden;}

.left{width:800px; background:#96C; float:left;word-wrap: break-word;word-break: break-all;}

.right{width:140px; background:#0FF; float:right;word-wrap: break-word;word-break: break-all;}

#fotter{width:100%;background:#666;}

</style>


</head>


<body>

<div id="wrap">

<div id="hedder">hadder</div>

<div id="mainbody">

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

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

    

    </div>

    

<div id="fotter">fotter</div>

</div>


</body>

</html>


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

qq_未来一场梦_0 提问者

word-wrap: break-word;word-break: break-all;这两个有什么不一样
2016-07-29 回复 有任何疑惑可以回复我~
#2

盯叮町玎仃 回复 qq_未来一场梦_0 提问者

一个是用于中文的,一个是用于英文的
2016-07-29 回复 有任何疑惑可以回复我~
#3

qq_未来一场梦_0 提问者 回复 盯叮町玎仃

哪个是中文哪个是英文
2016-07-29 回复 有任何疑惑可以回复我~

f12看了left right没有继承overflow的属性。是可以溢出的

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

word-wrap: break-word;word-break: break-all;这两个有什么不一样

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

迟郁凝

http://www.cnblogs.com/2050/archive/2012/08/10/2632256.html看这边文章就懂了,并不是断英文和中文的区别
2016-08-07 回复 有任何疑惑可以回复我~
#2

qq_未来一场梦_0 提问者 回复 迟郁凝

谢谢你
2016-08-14 回复 有任何疑惑可以回复我~

http://img1.sycdn.imooc.com//5795d8aa000162b210130105.jpg就成了这样

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

举报

0/150
提交
取消
网页布局基础
  • 参与学习       214707    人
  • 解答问题       1756    个

让你精通CSS中三大定位机制,彻底掌握网页布局的相关知识

进入课程

如果不设置高度,而且设置overflow:flow的话里面的字体溢出无法显示

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