Огонек, можно пример глянуть, так более понятно будет, ссылку или тут можно макетик сделать.
|
<!DOCTYPE html> <html> <head> <title>Untitled</title> <meta charset="utf-8"> <style type="text/css"> .tablem .colored td, .tablem .colored{ background-color:#9999ff; } </style> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <script> $(function() { var html_orders = "", my_orders = [{id_order: 1},{id_order: 5},{id_order:12}] $.each(my_orders, function() { html_orders += '<tr class="colored">'; html_orders += '<td>'+this.id_order+'</td>'; html_orders += '</tr>'; }); $(".tablem tbody").append(html_orders) }); </script> </head> <body> <table class="tablem"> <tbody> </tbody> </table> </body> </html> |
Цитата:
.tablem .colored td, .tablem .colored{ background-image: url([url]https://javascript.ru/forum/images/ca_serenity/misc/logo.gif);[/url] } .tablem .colored td, .tablem .colored{ background:#9999ff; } |
Цитата:
.tablem .colored td, .tablem .colored{ background:#9999ff url(https://javascript.ru/forum/images/ca_serenity/misc/logo.gif); } |
Цитата:
|
Цитата:
.tablem .colored td, .tablem .colored{ background:#9999ff url(https://javascript.ru/forum/images/ca_serenity/misc/logo.gif); background-size: cover; } пожалуйста =) |
Цитата:
Цитата:
|
Я не пропал - нашел причину неудач. Как только изменил tablem на tablem1? сразу все заработало. Мое изменение стиля не имеет приоритета над файлом css. Может такое быть?
|
Цитата:
|
Цитата:
#tablem .colored td, #tablem .colored{ background-color:#9999ff; } |
Часовой пояс GMT +3, время: 08:31. |