嵌套 CSS 声明,是否可能且正确?

问题描述 投票:0回答:1

我可以将声明嵌套在另一个选择器中吗?

td:hover
{
  background-color: darkblue;
  color: white;
  border-color: purple;
  text-decoration: underline double;
  img
    {
      border: solid 2.5px purple;
    }
}

使用 CSS 是否有效且正确?

html css nested css-selectors
1个回答
0
投票

这可能是在大多数浏览器中,如果您在使用 scss 时遇到问题,您可以在那里缩进,它会编译为正常的 CSS。

© www.soinside.com 2019 - 2024. All rights reserved.