案例:CSS3 案例     状态:可编辑再运行    进入横版
AخA
  alert("Your browser doesn't support this example!");
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<style>
5
.box
6
{
7
display:-moz-box;
8
display:-webkit-box;
9
display:box;
10
width:200px;
11
height:100px;
12
border:2px solid red;
13
}
14
</style>
15
<script>
16
function ChangeBoxAlign(x)
17
{
18
// Returns the selected option's text
19
var boxAlign=x.options[x.selectedIndex].text;
20
var div=document.getElementById("myDiv");
21
if (div.style.MozBoxAlign!==undefined)
22
  {
23
  div.style.MozBoxAlign=boxAlign;
24
  }

 运行结果 
 北美留学生论坛