日期:2014-05-17  浏览次数:20655 次

为什么div不能在页面右侧隐藏起来啊 而是下面有个移动框
<!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>
<style>
#div1 {width:150px; height:200px; background:green; position:absolute; right:-140px;}

</style>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body>
<div id="div1"></sdiv>

</body>
</html>
HTML css position

------解决方案--------------------
嗯,那试试隐藏横向滚动条吧。
body {overflow-x:hidden}
------解决方案--------------------
<body style='overflow: hidden;'  >
------解决方案--------------------
body {
    overflow:hidden;
    }