1.安装Less npm install less less-loader -D 2.基本用法 //必须在style标签上加scoped属性 <style scoped lang="less"> ul { li { width:160px; height:90px; border-bottom:1px solid #333; &:first-of-type { border-bottom:1px solid red; } &:last-child { border-bottom:0; } } } </style>