弹性盒子嵌套
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title> 弹性布局嵌套: 1,谨记:由外向内进行设置弹性盒子。先设置外部弹性布局,然后在设定里面的布局即可。 </title> </head> <style> /* 1,以下是给弹性盒子设置主轴及其方向设置flex-direction: row; 2,通过.column不设置宽度(由内容撑开),来设置排列方式。 */ .flex-container-one{ width: 500px; height: 500px; background: #B6B67B; margin: auto; margin-top: 50px; display: flex; flex-direction: row; justify-content: space-evenly; } .column{ display: flex; background: #439290; flex-grow: 0; flex-shrink: 0; flex-basis: 0; flex-wrap: nowrap; flex-direction: column; justify-content: space-evenly; /*align-content: space-evenly;*/ }