老师 我想问一下 我的代码为什么不能左右滑动呢
<!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" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>全屏切换--如果不指定宽度,是垂直的</title>
<style type="text/css">
*{padding:0;margin: 0;}
html,body{height: 100%;overflow: hidden;}
#container,.section{height:100%;}
.section{background-position: 50% 50%;background-size: cover;}
#section1{background-color:red;}
#section2{background-color: yellow;}
#section3{background-color: green;}
#section4{background-color: blue;}
.left{float:left;}
#container{width:400%;}
.section{width: 25%;}
</style>
</head>
<body>
<div id="container">
<div id="section1" class="section left"></div>
<div id="section2" class="section left"></div>
<div id="section3" class="section left"></div>
<div id="section4" class="section left"></div>
</div>
</body>
</html>