41 lines
734 B
HTML
41 lines
734 B
HTML
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
|
||
|
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||
|
<meta name="viewport" content="width-device-width,initial-scale=1.0">
|
||
|
<title>flex</title>
|
||
|
|
||
|
<style>
|
||
|
|
||
|
#app {
|
||
|
/* 变flex容器 */
|
||
|
display: flex;
|
||
|
height: 200px;
|
||
|
background-color: lightcoral;
|
||
|
}
|
||
|
.box {
|
||
|
background-color: lightgreen;
|
||
|
width: 100px;
|
||
|
height: 100px;
|
||
|
}
|
||
|
|
||
|
|
||
|
</style>
|
||
|
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
|
||
|
<div id="app">
|
||
|
<div class="box"><span>1</span></div>
|
||
|
<div class="box">2</div>
|
||
|
<div class="box">3</div>
|
||
|
<div class="box">4</div>
|
||
|
</div>
|
||
|
|
||
|
</body>
|
||
|
|
||
|
</html>
|