CSS3 利用盒子模型进行横排

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<title>Document</title>

</head>

 

<style>

 

body{display:-webkit-box; -webkit-box-orient:horizontal;}

 

div{height:100px;}

.div1{background:orange;}

.div2{background:pink;}

.div3{background:red;}

 

</style>

 

<body>

 

<div class="div1"> 盒子1 </div>

<div class="div2"> 盒子2 </div>

<div class="div3"> 盒子3 </div>

 

</body>

 

</html>

posted @ 2014-08-04 09:33  Zion0707  阅读(403)  评论(0编辑  收藏  举报