ho tabella come questa:Trova testo e aggiungere css senza utilizzare jquery/javascript
Tabella 1:
<table>
<tr>
<th>Title1</th>
<th>Title2</th>
<th>Title3</th>
<th>Title4</th>
</tr>
<tr>
<td>Text1</td>
<td>Text2</td>
<td>Text3</td>
<td>Text4</td>
</tr>
<tr>
<td>Text1</td>
<td>Text2</td>
<td>Text3</td>
<td>Text4</td>
</tr>
</table>
Table2:
<table>
<tr>
<th>Title1</th>
<th>Title2</th>
<th>Title4</th>
</tr>
<tr>
<td>Text1</td>
<td>Text2</td>
<td>Text4</td>
</tr>
<tr>
<td>Text1</td>
<td>Text2</td>
<td>Text4</td>
</tr>
</table>
Tabella 3:
<table>
<tr>
<th>Title4</th>
</tr>
<tr>
<td>Text4</td>
</tr>
<tr>
<td>Text4</td>
</tr>
</table>
Qui ho 3 tavoli (3 tavoli non sono costanti Tutte le tabelle hanno Titolo4 intestazione ma posizione diversa. Devo cambiare il colore per tutte le tabelle per il testo "Title4" solo senza usare jquery/javascript. Solo usando in css. Eventuali suggerimenti?
ho cercato qualche altro. [title ~ = Title4] {background-color: yellow; }. Ma so che questo è un metodo sbagliato. – RSKMR
Puoi facilmente consultare questo link http://stackoverflow.com/questions/1520429/is-there-a-css-selector-for-elements-contain-certain-text –
Controlla la mia risposta aggiornata! – Spade