📅  最后修改于: 2023-12-03 15:40:49.264000             🧑  作者: Mango
爱尔兰国旗,又称三色旗,由三个颜色组成,从左至右依次为绿色、白色和橙色。绿色象征持久和和平,白色象征统一,橙色象征宗教自由。
<div style="width: 200px; height: 133px; background-color: #169b62; display: inline-block;"></div>
<div style="width: 200px; height: 133px; background-color: #ffffff; display: inline-block;"></div>
<div style="width: 200px; height: 133px; background-color: #ff883e; display: inline-block;"></div>
.flag {
width: 200px;
height: 133px;
}
.green {
background-color: #169b62;
}
.white {
background-color: #ffffff;
}
.orange {
background-color: #ff883e;
}
const flag = document.createElement('div');
flag.classList.add('flag');
const green = document.createElement('div');
green.classList.add('green');
flag.appendChild(green);
const white = document.createElement('div');
white.classList.add('white');
flag.appendChild(white);
const orange = document.createElement('div');
orange.classList.add('orange');
flag.appendChild(orange);
document.body.appendChild(flag);