如何为元素及其后代设置样式?例如:
.datepick-month-header, .datepick-month-header select, .datepick-month-header input {
background-color: black;
color: #fff;
font-weight: bold;
Run Code Online (Sandbox Code Playgroud)
}
在较少的文档中,我发现嵌套样式,效果很好,但我想选择BOTH $ this和后代.
.datepick-month-header {
select, input { // this selects "select" and "input",
}
Run Code Online (Sandbox Code Playgroud)
}
如何在一个声明中设置所有三个元素(父元素,子元素)?
谢谢