demo
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title></title>
<style type="text/css">
#container {
width: 800px;
height: 800px;
display: flex;
justify-content: space-between;
align-items: flex-start;
}
#container1 {
width: 300px;
height: 500px;
border: 2px dashed #ddd;
}
#container2 {
width: 300px;
height: 500px;
border: 2px dashed #ddd;
}
.item {
width: 100px;
height: 100px;
}
#red {
background: red;
}
#yellow {
background: yellow;
}
#blue {
background: blue;
}
</style>
</head>
<body>
<div id="container">
<div id="container1">
<div id="red" class