【问题标题】:CKEditor css style brokenCKEditor css 样式损坏
【发布时间】:2014-10-23 10:49:51
【问题描述】:

我刚刚下载了ckEditor,出现了显示问题。当我的页面定义了 body 的样式时,p...现在这些样式会影响 ckEditor css,因为它也定义了 css 标记体..这使得 ckEditor 样式中断

那么,我应该如何分离这些 css 以在我的页面上正确显示 ckEditor?

还有一个问题,我为我的表定义了一个CSS如下,它的类名是“standardTable01”

.standardTable01 {
  color: #333;
  text-align: left;
  line-height: 40px;
  border-spacing: 0;
  border: 1px solid #428bca;
  width: 500px;
  cursor:pointer;
}

.standardTable01 thead tr:first-child {
  background: #428bca;
  color: #fff;
  border: none;
}

.standardTable01 th {font-weight: bold;}
.standardTable01 th:first-child, td:first-child {padding: 0 15px 0 20px;}

.standardTable01 thead tr:last-child th {border-bottom: 2px solid #ddd;}

.standardTable01 tbody tr:hover {background-color: #f0fbff; opacity:0.6}
.standardTable01 tbody tr:last-child td {border: none;}
.standardTable01 tbody td {border-bottom: 1px solid #ddd;}

.standardTable01 td:last-child {
  text-align: right;
  padding-right: 10px;
}

并且这个定义的影响到 ckEditor 也是如此。我不知道为什么会这样,因为 ckEditor 没有将表类名设置为与我的“standardTable01”相同...

先谢谢了!!!

【问题讨论】:

    标签: javascript html css ckeditor


    【解决方案1】:

    请注意,您在 CSS 文件中不小心使用了这个:

    .standardTable01 th:first-child, td:first-child {...}
    

    td:first-child 之前您没有添加.standardTable01

    关于第一个问题,您需要发布一个与 CKEditor“冲突”的样式示例。

    【讨论】:

    • 当我创建新表但未设置 classname="standardTable01" 时,该表并未完全应用这些 css。但是CKEditor是
    猜你喜欢
    • 1970-01-01
    • 2013-05-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-01-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多