欧根喵
欧根喵
Published on 2025-09-19 / 14 Visits
0
0

wangEditor 表格样式问题

.device-description {
  h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
  }

  .description-content {
    line-height: 1.8;
    color: #555;

    :deep(img) {
      max-width: 100%;
    }

    :deep(p) {
      margin-bottom: 15px;
    }

    :deep(table) {
      border-collapse: collapse;
      border: 1px solid #ccc;
      text-align: center;
    }

    :deep(td),
    :deep(th) {
      border: 1px solid #ccc;
      min-width: 50px;
      height: 20px;
      padding: 4px;
      text-align: center;
    }

    :deep(th) {
      background-color: #0077ff;
      font-weight: bold;
      text-align: left;
      text-align: center;
      color: white;
    }

    :deep(.editor-content-view td:nth-child(1)),
    :deep(.editor-content-view td:nth-child(2)) {
      background-color: #fff;
    }

    :deep(.editor-content-view tr:nth-child(even) td:nth-child(1)),
    :deep(.editor-content-view tr:nth-child(even) td:nth-child(2)) {
      background-color: #f5f5f5;
    }
    
    /* 整行选择效果 */
    :deep(.editor-content-view tr:hover) {
      background-color: #e6f3ff;
    }
  }
}


Comment