我正在研究Pronote的HA卡。

这个块是我在@vingerha和1提议的地图上工作的后续工作。

我的目标是替换剧本。 python 的 通过 整合 整合.

[本页更新]

  • 修正V0.6.0后, 家庭 作业 》 取而代之 家庭 作业 》 
  • 添加Canteen菜单卡(>V6.0.6)

先决条件

我正在考虑安装界面。 卡 模组 在HACS

时间 使用 地图

两者都非常干净,对于取消的课程,我在红色按钮或交叉时间之间犹豫不决,两者都是相关的。

我混合了两者,并在『阶级理事会』之前增加了一个空间,我也在标题中重新修改了日期,因为它必须被发现。

代码是:

类型: Markdown 内容: &gt;- {% 设置 state_attr('sensor.pronote_xx_coralie _timetable _next_day', 'lessons') %} <div>时间使用: {as _timestamp(items[0].start _at)| int θ timestamp _custom(')%d/%m/%Y', true)} </div>

    <table>   {% for i in range(0, items | count, 1) %}  <tr> 
      {%- if items[i].coutled!%} 
      <td><mark>{ item[i].start_time}</td> 
      <td><mark>{{ items[i].end _time }</td></mark>
      <td>{{ item[i].lesson } {{ item[i].lesson } { item[i].lesson } { item[i].lesson } {% 其他 其它 %} <td><del>{{ items[i].start _time }</td> <td><del>{{ items[i].end _time}</td> <td><del>{{ item[i].lesson }</del> {%持久 -%} {% 如果 items[i].status! %} <span> {{ item[i].status }</td> {% Endif 的 %} <td> {{items[i].classroom }</td> </tr> {% 结束 于 %} </table> 
  Card_mod : 风格: .: | ha-card ha-markdown { padding:0px } ha-card ha-markdown.no-header { padding:0px } ha-markdown$: | div { background-color:rgb(100,100); 填充 : 12px 12px; 颜色:白色; font-weight:normal; font-size:1.2em; border-top-left-radius: 5px; Border-top-right-radius: 5px; } table{ border-collapse : 崩溃; 字体大小 : 0.9em; font-family : 机器人; 宽度 : 100%; 提纲: 0px 固体 #393c3d; margin-top:5px; } 注释 { text-align: 中心; 字体重量 : 大胆; 字体大小 : 1.2em; } TD {padding: 5px 10px 5px 10px 文本对齐: 左; 边界底部: 0px 固体 #1c2020; } TR { border-bottom: 0px 固体 #1c2020; } TR:nth-of-type(even){ background-color: RGB(54、54、54、0.3); } TR:last-of-type { border-bottom: 透明; }* 标记 { 背景: #009767; 颜色 : #222627; Border-radius: 5px; 填充 : 5px; } span {背景: #EC4B34; 颜色 : #222627; Border-radius: 5px; 填充 : 5px; } span {padding: 5px; } TR:nth-child(n+2)&gt; td:nth-child(2){ text-align: 左; 类型: 」 」

家庭作业地图

我改变了实体,结果是:

其代码:

类型: Markdown 内容: 《 | -
    <div>职责 职责</div>
    <table>
        <tbody>
            {% 设置项目 = state_attr('sensor.pronote_xx_coralie _homework','homework') %} {%-for I in range(0, items | count, 1)-%}
            <tr>
                <td>
                {%- if items[i].done == true -%}
                    <mark>
                    {items[i].date.strftime()%d/%m)}}
                    </mark>
                {%不然 - 否则 -%}
                    <span>
                    {items[i].date.strftime()%d/%m)}}
                    </span>
                {% Endif 的 %}</td>              
                <td>{{items[i].subject}</td>
                <td>{{items[i].description}</td>
            </tr>
            {% 结束 于 %}
      </tbody>
    </table>
  Card_mod : 风格: .: | ha-card ha-markdown { padding:0px } ha-card ha-markdown.no-header { padding:0px } ha-markdown$: | h1 { font-weight: 正常; 字体大小 : 24px; div { background-color:rgb(100,100,100); 填充 : 12px 12px; 颜色:白色; font-weight:normal; font-size:1.2em; border-top-left-radius: 5px; Border-top-right-radius: 5px; } table{ border-collapse : 崩溃; 字体大小 : 0.9em; font-family : 机器人; 宽度 : 汽车; 提纲: 0px 固体 #393c3d; 保证金顶 : 10px; } 注释 { text-align: 中心; 字体重量 : 大胆; 字体大小 : 1.2em; } TD {padding: 5px 5px 5px 5px 文本对齐: 左; 边界底部: 0px 固体 #1c2020; } TR { border-bottom: 0px 固体 #1c2020; } TR:nth-of-type(even){ background-color: RGB(54、54、54、0.3); } TR:last-of-type { border-bottom: 透明; } Mark {背景: #009767; 颜色 : #222627; Border-radius: 5px; 填充 : 5px; } span {背景: #EC4B34; 颜色 : #222627; Border-radius: 5px; 填充 : 5px; } span {padding: 5px; } TR:nth-child(n+2)&gt; td:nth-child(2){ text-align: 左; }

注: 需要检查是否使用 sensor.pronote _xx_coralie _homework _period 或 sensor.pronote _xx _coralie _homework。

评价地图

我已经把绿色变成了绿色的心,我认为它更好。 这是与整合的地图:

类型: Markdown 内容: &gt;-
    <div>评价</div> {% 设置 state_attr('sensor.pronote_xx_coralie_evaluations','evaluations')%}
    <table width='100%'>
      <tbody>
      {% for i in range(0, items | count, 1) %}
      <tr><td width='10%'>{ item[i].date.strftime()%d-%m)}}</td><td width='60%'>{{ item[i].subject }</td><td width='30%'>
      {% 集合收购=项目[i]。 %} {% 对于 range(0, acquisitions|count,1)中的j %{\displaystyle }% if acquisitions[j].level == '非常好的掌握' %\n\n\n\n\n% Elif acquisitions[j].level == 『满意控制』 %\n\n\n\n\n% Elif acquisitions[j].level == 『掌握的开始』 %\n\n\n\n\n% Elif acquisitions[j].level == 'Fragile mastery' %\n\n\n\n\n% Elif acquisitions[j].level == 『控制不足』 %\n\n\n\n\n% 其他 其它 %? {\displaystyle }% Endif 的 %{\displaystyle }% 结束 于 %}</td></tr>
      {% 结束 于 %}
    </tbody> </table>
  Card_mod : 风格: .: | ha-card ha-markdown { padding:0px } ha-card ha-markdown.no-header { padding:0px } ha-markdown$: | h1 { font-weight: 正常; 字体大小 : 24px; div { background-color:rgb(100,100,100); 填充 : 12px 12px; 颜色:白色; font-weight:normal; font-size:1.2em; border-top-left-radius: 5px; Border-top-right-radius: 5px; } table{ border-collapse : 崩溃; font-weight:normal; font-size:1.2em; font-family : 机器人; 宽度 : 汽车; 提纲: 0px 固体 #393c3d; 保证金顶 : 10px; } 注释 { text-align: 中心; 字体重量 : 大胆; 字体大小 : 1.2em; } TD {padding: 0px 5px 0px 5px; 文本对齐: 左; 边界底部: 0px 固体 #1c2020; } TR { border-bottom: 0px 固体 #1c2020; 线高度: 4px; } TR:nth-of-type(even){ background-color: RGB(54、54、54、0.3); } TR:last-of-type { border-bottom: 透明; } Mark {背景: #009767; 颜色 : #222627; Border-radius: 10px; 填充 : 5px; } span {背景: #EC4B34; 颜色 : #222627; Border-radius: 10px; 填充 : 5px; } span {padding: 5px; } TR:nth-child(n+2)&gt; td:nth-child(2){ text-align: 左; }

缺席地图

它是完美的,为了适应其他卡的设计,结果是:

类型: Markdown 内容: &gt;-
    <div>缺席 的</div><table> 

    {% 设置 state_attr('sensor.pronote_xxx_coralie _absences','absences') %} {% for i in range(0, items | count, 1) %}

    <tr>

    {%- if items[i].justified == True -%}

    <td> <mark> { item[i].from.strftime()%d-%m)}}</mark></td>

    {% 其他 其它 %}

    <td> <span>{ item[i].from.strftime()%d-%m)}}</span></td> 

    {%持久 -%} 

    <td>{{ items[i].hours }</td>

    <td>{{ item[i].reason }</td>

    {% 结束 于 rd_mod : 风格: .: | ha-card ha-markdown { padding:0px } ha-card ha-markdown.no-header { padding:0px } ha-markdown$: | div { background-color:rgb(100,100); 填充 : 12px 12px; 颜色:白色; font-weight:normal; font-size:1.2em; border-top-left-radius: 5px; Border-top-right-radius: 5px; } table{ border-collapse : 崩溃; font-family : 机器人; 宽度 : 100%; 提纲: 0px 固体 #393c3d; margin-top:5px; } 注释 { text-align: 中心; 字体重量 : 大胆; 字体大小 : 1.2em; } TD {padding: 5px 10px 5px 10px 文本对齐: 左; 边界底部: 0px 固体 #1c2020; } TR { border-bottom: 0px 固体 #1c2020; } TR:nth-of-type(even){ background-color: RGB(54、54、54、0.3); } TR:last-of-type { border-bottom: 透明; }* 标记 { 背景: #009767; 颜色 : #222627; Border-radius: 5px; 填充 : 5px; } span {背景: #EC4B34; 颜色 : #222627; Border-radius: 5px; 填充 : 5px; } span {padding: 5px; } TR:nth-child(n+2)&gt; td:nth-child(2){ text-align: 左; }

食堂菜单地图

V6.0.6 最低要求

类型 : Markdown 内容: 《 | -
  <div>菜单 食堂</div>
  <table>
      <tbody>
  {% 设置 state_attr('sensor.pronote_xxx_menus','menus') %}
    <tr>
    <td><h4>日期 日期</td>
    <td><h4>入口 入口</td>
    <td><h4>主要 课程</td>
    <td><h4>伴奏 伴奏</td>
    <td><h4>奶酪 奶酪</td>
    <td><h4>甜点 甜点</td>
    </tr>
  {% for i in range(0, items | count, 1) %} {% 如果 items[i].is_lunch == True %}
    <tr>
    <td>      
    <mark>  
    { item[i].date | as_datetime θ as_timestamp θ timestamp _custom(')%d/%我)}
    </mark>
    </td>
    <td> 
      {% 项目[i].first_meal %} { entry.name } { entry.name } { { entry.name } { } { entry.name } { } {% 结束 于 %}
    </td>
    <td> 
      {% 在 items[i].main_meal 中的 main %}{ main.name } { main.name } {% 结束 于 %}
    </td>
    <td>
      {% 如果 items[i].side_meal %} {% 在 items[i].side_meal %} { side.name } { side.name } { \displaystyle } { side.name } { } { side.name% 结束 于 %} {% 其他 其它 %} Pas _DISPO {% Endif 的 %}
    </td>
    <td>
      {% 奶酪在项目[i].cheese %} { cheese.name } { cheese.name } { \displaystyle } { cheese.name } { cheese.name }} {% 结束 于 %}
    </td>
    <td>
      {% 甜点在项目[i].dessert %} { dessert.name } { dessert.name } { } { dessert.name } { } { dessert.name }% 结束 于 %}
    </td>
      {% Endif 的 %} {% 结束 于 %}
    </tbody>
  </table>
Card_mod : 风格: .: | ha-card ha-markdown { padding:0px } ha-card ha-markdown.no-header { padding:10px } ha-markdown$: | div { background-color:rgb(100,100); 填充 : 12px 12px; 颜色:白色; font-weight:normal; font-size:1.2em; border-top-left-radius: 5px; Border-top-right-radius: 5px; } table{ border-collapse : 崩溃; font-family : 机器人; 宽度 : 100%; 提纲: 0px 固体 #393c3d; margin-top:5px; } 注释 { text-align: 中心; 字体重量 : 大胆; 字体大小 : 1.2em; } TD {padding: 5px 10px 5px 10px 文本对齐: 左; 边界底部: 0px 固体 #1c2020; } TR { border-bottom: 0px 固体 #1c2020; } TR:nth-of-type(even){ background-color: RGB(54、54、54、0.3); } TR:last-of-type { border-bottom: 透明; }* 标记 { 背景: #009767; 颜色 : #222627; Border-radius: 5px; 填充 : 5px; } span {背景: #EC4B34; 颜色 : #222627; Border-radius: 5px; 填充 : 5px; } span {padding: 5px; } TR:nth-child(n+2)&gt; td:nth-child(2){ text-align: 左; }

 

补充资料

多亏了极好的想法 @dathosim 脚本, 我将添加模板,给我这些信息,代码放置在模板中。

传感器: 姓名: Pronote Unique _id 的最新更新: Sensor.latest _mise _a _jour _de _pronote 图标: "MDI:update"状态: {state_attr('sensor.pronote_xx_coralie','updated_at')。%d-%M-%Y 至 %H:%m')}}" - 传感器: 姓名: Coralie的课程开始 - Demain unique _id: sensor.debut_des_courses_de_dealie_demain 图标: "MDI:clock-time-five-outline"状态: >- {% 如果 state_attr('sensor.pronote_xx_coralie _timetable _tomorrow', 'lessons')[0] %{State _attr('sensor.pronote _xx_coralie _timetable _tomorrow', 'lessons')[0]['start _at'].strftime('''start _at']%H:%m')}} {% 其他 其它 %没有类 {% Endif 的 %传感器: 姓名: Coralie的课程开始 - 今天独一无二的_id: Sensor.debut_des_courses_de_coralie_today _hui 图标: "MDI:clock-time-five-outline"状态: >- {% 如果 state_attr('sensor.pronote_xx_coralie _timetable _today', 'lessons')[0] %{State _attr('sensor.pronote _xx_coralie _timetable _today', 'lessons')[0]['start _at'].strftime('''start _at']%H:%m')}} {% 其他 其它 %没有类 {% Endif 的 %}

 

 

最终结果 

完整瓷砖的最终代码:

类型 : 水平堆栈列: 1 平方: 假卡片: 类型: 垂直堆栈卡: 类型: Markdown 内容: &gt;- {% 设置 state_attr('sensor.pronote_xx_coralie _timetable_today', 'lessons') %} <div>时间使用: {as _timestamp(items[0].start _at)| int θ timestamp _custom(')%d/%m/%Y', true)} </div>

          <table>   {% for i in range(0, items | count, 1) %}  <tr> 
            {%- if items[i].coutled!%} 
            <td><mark>{ item[i].start_time}</td> 
            <td><mark>{{ items[i].end _time }</td></mark>
            <td>{{ item[i].lesson } {{ item[i].lesson } { item[i].lesson } { item[i].lesson } {% 其他 其它 %} <td><del>{{ items[i].start _time }</td> <td><del>{{ items[i].end _time}</td> <td><del>{{ item[i].lesson }</del> {%持久 -%} {% 如果 items[i].status! %} <span> {{ item[i].status }</td> {% Endif 的 %} <td> {{items[i].classroom }</td> </tr> {% 结束 于 %} </table> 
        Card_mod : 风格: .: | ha-card ha-markdown { padding:0px } ha-card ha-markdown.no-header { padding:10px } ha-markdown$: | div { background-color:rgb(100,100); 填充 : 12px 12px; 颜色:白色; font-weight:normal; font-size:1.2em; border-top-left-radius: 5px; Border-top-right-radius: 5px; } table{ border-collapse : 崩溃; font-family : 机器人; 宽度 : 100%; 提纲: 0px 固体 #393c3d; margin-top:5px; } 注释 { text-align: 中心; 字体重量 : 大胆; 字体大小 : 1.2em; } TD {padding: 5px 10px 5px 10px 文本对齐: 左; 边界底部: 0px 固体 #1c2020; } TR { border-bottom: 0px 固体 #1c2020; } TR:nth-of-type(even){ background-color: RGB(54、54、54、0.3); } TR:last-of-type { border-bottom: 透明; }* 标记 { 背景: #009767; 颜色 : #222627; Border-radius: 5px; 填充 : 5px; } span {背景: #EC4B34; 颜色 : #222627; Border-radius: 5px; 填充 : 5px; } span {padding: 5px; } TR:nth-child(n+2)&gt; td:nth-child(2){ text-align: 左; 类型: Markdown 内容: &gt;- {% 设置 state_attr('sensor.pronote_xx_coralie _timetable _next_day', 'lessons') %} <div>时间使用: {as _timestamp(items[0].start _at)| int θ timestamp _custom(')%d/%m/%Y', true)} </div>

          <table>   {% for i in range(0, items | count, 1) %}  <tr> 
            {%- if items[i].coutled!%} 
            <td><mark>{ item[i].start_time}</td> 
            <td><mark>{{ items[i].end _time }</td></mark>
            <td>{{ item[i].lesson } {{ item[i].lesson } { item[i].lesson } { item[i].lesson } {% 其他 其它 %} <td><del>{{ items[i].start _time }</td> <td><del>{{ items[i].end _time}</td> <td><del>{{ item[i].lesson }</del> {%持久 -%} {% 如果 items[i].status! %} <span> {{ item[i].status }</td> {% Endif 的 %} <td> {{items[i].classroom }</td> </tr> {% 结束 于 %} </table> 
        Card_mod : 风格: .: | ha-card ha-markdown { padding:0px } ha-card ha-markdown.no-header { padding:10px } ha-markdown$: | div { background-color:rgb(100,100); 填充 : 12px 12px; 颜色:白色; font-weight:normal; font-size:1.2em; border-top-left-radius: 5px; Border-top-right-radius: 5px; } table{ border-collapse : 崩溃; font-family : 机器人; 宽度 : 100%; 提纲: 0px 固体 #393c3d; margin-top:5px; } 注释 { text-align: 中心; 字体重量 : 大胆; 字体大小 : 1.2em; } TD {padding: 5px 10px 5px 10px 文本对齐: 左; 边界底部: 0px 固体 #1c2020; } TR { border-bottom: 0px 固体 #1c2020; } TR:nth-of-type(even){ background-color: RGB(54、54、54、0.3); } TR:last-of-type { border-bottom: 透明; }* 标记 { 背景: #009767; 颜色 : #222627; Border-radius: 5px; 填充 : 5px; } span {背景: #EC4B34; 颜色 : #222627; Border-radius: 5px; 填充 : 5px; } span {padding: 5px; } TR:nth-child(n+2)&gt; td:nth-child(2){ text-align: 左; 类型: Markdown 内容: 《 | -
          <div>职责 职责</div>
          <table>
              <tbody>
                  {% 设置项目 = state_attr('sensor.pronote_xx_coralie _homework','homework') %} {%-for I in range(0, items | count, 1)-%}
                  <tr>
                      <td>
                      {%- if items[i].done == true -%}
                          <mark>
                          {items[i].date.strftime()%d/%m)}}
                          </mark>
                      {%不然 - 否则 -%}
                          <span>
                          {items[i].date.strftime()%d/%m)}}
                          </span>
                      {% Endif 的 %}</td>              
                      <td>{{items[i].subject}</td>
                      <td>{{items[i].description}</td>
                  </tr>
                  {% 结束 于 %}
            </tbody>
          </table>
        Card_mod : 风格: .: | ha-card ha-markdown { padding:0px } ha-card ha-markdown.no-header { padding:10px } ha-markdown$: | h1 { font-weight: 正常; 字体大小 : 24px; div { background-color:rgb(100,100,100); 填充 : 12px 12px; 颜色:白色; font-weight:normal; font-size:1.2em; border-top-left-radius: 5px; Border-top-right-radius: 5px; } table{ border-collapse : 崩溃; font-weight:normal; font-size:1.2em; font-family : 机器人; 宽度 : 汽车; 提纲: 0px 固体 #393c3d; 保证金顶 : 10px; } 注释 { text-align: 中心; 字体重量 : 大胆; 字体大小 : 1.2em; } TD {padding: 5px 5px 5px 5px 文本对齐: 左; 边界底部: 0px 固体 #1c2020; } TR { border-bottom: 0px 固体 #1c2020; } TR:nth-of-type(even){ background-color: RGB(54、54、54、0.3); } TR:last-of-type { border-bottom: 透明; } Mark {背景: #009767; 颜色 : #222627; Border-radius: 5px; 填充 : 5px; } span {背景: #EC4B34; 颜色 : #222627; Border-radius: 5px; 填充 : 5px; } span {padding: 5px; } TR:nth-child(n+2)&gt; td:nth-child(2){ text-align: 左; 类型: Markdown 内容: &gt;-
          <div>缺席 的</div><table> 

          {% 设置 state_attr('sensor.pronote_xx_coralie_absences','absences') %} {% for i in range(0, items | count, 1) %}

          <tr>

          {%- if items[i].justified == True -%}

          <td> <mark> { item[i].from.strftime()%d-%m)}}</mark></td>

          {% 其他 其它 %}

          <td> <span>{ item[i].from.strftime()%d-%m)}}</span></td> 

          {%持久 -%} 

          <td>{{ items[i].hours }</td>

          <td>{{ item[i].reason }</td>

          {% 结束 于 rd_mod : 风格: .: | ha-card ha-markdown { padding:0px } ha-card ha-markdown.no-header { padding:10px } ha-markdown$: | div { background-color:rgb(100,100); 填充 : 12px 12px; 颜色:白色; font-weight:normal; font-size:1.2em; border-top-left-radius: 5px; Border-top-right-radius: 5px; } table{ border-collapse : 崩溃; font-family : 机器人; 宽度 : 100%; 提纲: 0px 固体 #393c3d; margin-top:5px; } 注释 { text-align: 中心; 字体重量 : 大胆; 字体大小 : 1.2em; } TD {padding: 5px 10px 5px 10px 文本对齐: 左; 边界底部: 0px 固体 #1c2020; } TR { border-bottom: 0px 固体 #1c2020; } TR:nth-of-type(even){ background-color: RGB(54、54、54、0.3); } TR:last-of-type { border-bottom: 透明; }* 标记 { 背景: #009767; 颜色 : #222627; Border-radius: 5px; 填充 : 5px; } span {背景: #EC4B34; 颜色 : #222627; Border-radius: 5px; 填充 : 5px; } span {padding: 5px; } TR:nth-child(n+2)&gt; td:nth-child(2){ text-align: 左; 类型: custom:auto-entities 卡 : 类型 : 实体过滤 : 包括: Entent_id : binary_sensor.open_today_intent_id: binary_sensor.open_demain - entity_id: binary_sensor.vacances_schools_today - entity_id: binary_sensor.vacances_scolaires_demain - entity_id: Sensor.debut_des_courses_coralie_today_ entity_id: sensor.debut_des_courses_de_dealie_demain - entity_id: Sensor.coralie_next_alarm - 类型: custom:auto-entities 卡 : 类型 : 实体过滤 : 包括: Entent_id : Sensor.latest _mise_a_jour_de_pronote - 类型: 垂直堆栈卡: 类型: Markdown 内容: &gt;-
          <div>评价</div> {% 设置 state_attr('sensor.pronote_xx_coralie_evaluations','evaluations')%}
          <table width='100%'>
            <tbody>
            {% for i in range(0, items | count, 1) %}
            <tr><td width='10%'>{ item[i].date.strftime()%d-%m)}}</td><td width='60%'>{{ item[i].subject }</td><td width='30%'>
            {% 集合收购=项目[i]。 %} {% 对于 range(0, acquisitions|count,1)中的j %{\displaystyle }% if acquisitions[j].level == '非常好的掌握' %\n\n\n\n\n% Elif acquisitions[j].level == 『满意控制』 %\n\n\n\n\n% Elif acquisitions[j].level == 『掌握的开始』 %\n\n\n\n\n% Elif acquisitions[j].level == 'Fragile mastery' %\n\n\n\n\n% Elif acquisitions[j].level == 『控制不足』 %\n\n\n\n\n% 其他 其它 %? {\displaystyle }% Endif 的 %{\displaystyle }% 结束 于 %}</td></tr>
            {% 结束 于 %}
          </tbody> </table>
        Card_mod : 风格: .: | ha-card ha-markdown { padding:0px } ha-card ha-markdown.no-header { padding:10px } ha-markdown$: | h1 { font-weight: 正常; 字体大小 : 24px; div { background-color:rgb(100,100,100); 填充 : 12px 12px; 颜色:白色; font-weight:normal; font-size:1.2em; border-top-left-radius: 5px; Border-top-right-radius: 5px; } table{ border-collapse : 崩溃; font-weight:normal; font-size:1.2em; font-family : 机器人; 宽度 : 汽车; 提纲: 0px 固体 #393c3d; 保证金顶 : 10px; } 注释 { text-align: 中心; 字体重量 : 大胆; 字体大小 : 1.2em; } TD {padding: 0px 5px 0px 5px; 文本对齐: 左; 边界底部: 0px 固体 #1c2020; } TR { border-bottom: 0px 固体 #1c2020; 线高度: 4px; } TR:nth-of-type(even){ background-color: RGB(54、54、54、0.3); } TR:last-of-type { border-bottom: 透明; } Mark {背景: #009767; 颜色 : #222627; Border-radius: 10px; 填充 : 5px; } span {背景: #EC4B34; 颜色 : #222627; Border-radius: 10px; 填充 : 5px; } span {padding: 5px; } TR:nth-child(n+2)&gt; td:nth-child(2){ text-align: 左; }