Sorry, your browser cannot access this site
This page requires browser support (enable) JavaScript
Learn more >

nth-child and :nth-of-type 区别在写网页的时候,有时候需要对子元素区分,比如只修改第N个元素。比如上面的四个li,不同的li设置不同的颜色,这就需要用到CSS伪类选择器**:nth-of-type**。 12345678910111213141516171819202122li { &:nth-of-type(1) { ...

flex父元素设置 flex-flow: column; 垂直排列再使用 flex 自适应布局 calc height: calc(100% - 50px);剩余高度 = 父元素高度 - 已有高度 demo https://codepen.io/qiudaoermu/pen/mdwPWVx

1.父元素设置display:flex2.子元素设置 flex:1 12345678910111213141516171819202122#container{ width:400px; margin:0 auto; background-color: #ddd; display:flex;}// 不要设置 align-items 属性.left,.right{...

12345/* flex-direction 决定主轴的方向 row(默认)|row-reverse|column|column-reverse*//* flex-direction: row; *//* flex-wrap决定当排列不下时是否换行以及换行的方式,nowrap(默认)|wrap|wrap-reverse *//* flex-wrap:wrap; */ 12345678910...