【发布时间】:2014-08-22 02:03:03
【问题描述】:
我的 Twitter Bootstrap 文件中有以下 CSS:
*,
*:before,
*:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
这导致我的 TinyMCE 编辑器出现问题,主要是调整文本区域的大小。无论如何,如果我删除上面的代码一切都很好,但显然我需要它,否则 Bootstrap 的其余部分会中断。
那么,如何仅针对 TinyMCE 覆盖上述内容?我试过这个:
.tinymce-editor,
.tinymce-editor:before,
.tinymce-editor:after {
-webkit-box-sizing: content-box !important;
-moz-box-sizing: content-box !important;
box-sizing: content-box !important;
}
但没有运气。 .tinymce-editor 恰好是我的编辑器所在的 div。
【问题讨论】:
-
我只是建议
.tinymce-editor *.. 不过你可能不需要!important。 -
尝试通过添加另一个级别的选择器来避免使用
!important,即.parent .tinymce-editor *, -
@TK123 你可以回答你自己的问题。不要将答案添加到问题中,而是将其添加为答案。
-
正如@hitautodestruct 所说,您需要将答案发布为答案,而不是编辑。
标签: html css twitter-bootstrap