多个文本:{}使用Emmet的多个标签中的内容

时间:2016-10-03 12:47:07

标签: html emmet

我想知道如何在td中的每个tr内编写不同的文字内容。

我所知道的是:

table>tr*4>td*4{my td}

将会发生什么:

<table>
 <tr>
  <td>my td</td>
  <td>my td</td>
  <td>my td</td>
  <td>my td</td>
 </tr>
 <tr>
  <td>my td</td>
  <td>my td</td>
  <td>my td</td>
  <td>my td</td>
 </tr>
 <tr>
  <td>my td</td>
  <td>my td</td>
  <td>my td</td>
  <td>my td</td>
 </tr>
 <tr>
  <td>my td</td>
  <td>my td</td>
  <td>my td</td>
  <td>my td</td>
 </tr>
</table>

我想做的是:

<table>
 <tr>
  <td>my td-1</td>
  <td>my td-2</td>
  <td>my td-3</td>
  <td>my td-4</td>
 </tr>
 <tr>
  <td>my td-5</td>
  <td>my td-6</td>
  <td>my td-7</td>
  <td>my td-8</td>
 </tr>
 <tr>
  <td>my td-9</td>
  <td>my td-10</td>
  <td>my td-11</td>
  <td>my td-12</td>
 </tr>
 <tr>
  <td>my td-13</td>
  <td>my td-14</td>
  <td>my td-15</td>
  <td>my td-16</td>
 </tr>
</table>

这可行吗?如果是,那么如何?

2 个答案:

答案 0 :(得分:0)

试试这个

table>tr*5>td{$ my data}*4  

Link to Cheet Sheet for Emmet

答案 1 :(得分:0)

我能得到的最好的是:

table>tr*4>td*4>{mytd-$}

<table>
  <tr>
    <td>mytd-1</td>
    <td>mytd-2</td>
    <td>mytd-3</td>
    <td>mytd-4</td>
  </tr>
  <tr>
    <td>mytd-1</td>
    <td>mytd-2</td>
    <td>mytd-3</td>
    <td>mytd-4</td>
  </tr>
  <tr>
    <td>mytd-1</td>
    <td>mytd-2</td>
    <td>mytd-3</td>
    <td>mytd-4</td>
  </tr>
  <tr>
    <td>mytd-1</td>
    <td>mytd-2</td>
    <td>mytd-3</td>
    <td>mytd-4</td>
  </tr>
</table>

来自Emmet cheat sheet&gt;项目编号部分