css - 如何在 sass 中嵌入 css,或者在 sass 中使用 + 选择器?

标签 css sass

我需要像这样创建一个 css:

  .word-remain+textarea{clear: before}

但我不能用 sass 写这个:

  .word-remain+textarea
    clear: before

我该怎么做?

最佳答案

您正在使用两级缩进。这可能就是它不起作用的原因。

.word-remain+textarea
  clear: before

按预期编译

关于css - 如何在 sass 中嵌入 css,或者在 sass 中使用 + 选择器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8904941/

相关文章:

jQuery 以错误的顺序打乱 div block

html - IE10 中的 Flex 收缩

javascript - 在网站加载完成之前,侧边栏不会显示在正确的位置

css - 我的 Bootstrap 表单有两个不可点击的输入,不知道为什么

javascript - 为什么不能更新 css 变量名来应用不同的颜色主题?

html - 如何更改输入类型日期的日历图标?

CSS : Apply background to full width in a div with a fixed width

sass - 如何使用其他尺寸扩展 Bootstrap 4.1 $spacers

ruby-on-rails - 在生产中重新编译 Sass Assets

comments - 哪些输出样式会删除多行注释?