为什么宽度只有这么窄?
<html>
<style>
*{margin:0;padding:0;border:0;}
body{position:absolute;height:100%;}
.x1{width:100%;background:grey;}
.taskbar{width:100%;height:30px;background:yellow;}
</style>
<body>
<div class="index_container">
<div class="x1">
</div>
<div class="taskbar">
</div>
</div>
</body>
</html>
1、body设置的position 去掉
2、class为x1的高度要显式设置,不然浏览器默认height:0px
ps: F12控制台看下就清楚了...