Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
2582 Ansichten

I preset the background color of the table, such as < bgcolor = # fff >. When wkhtmltopdf is not installed, the preview will display normally, but when wkhtmltopdf is installed, there is no bgcolor. What is this? Of course, I also tried several versions of wkhtmltopdf

Avatar
Verwerfen
Beste Antwort

Hello drt,


try following code for apply background color

background-color:#E0E0E0;


Avatar
Verwerfen
Autor

Thank you, but I didn't use CSS, I just defined it in the HTML tag

Then write following code in your table tag

<table style="background-color:#E0E0E0;">

// YOUR CODE HERE.....

</table>

Autor

Thank you. It works for the whole table, but I need to mark each line with different colors. Then there is another problem. My font is too small

try this code and put it before your table tag

<style>

tr:nth-child(odd) {

background-color: #FF0000;

}

</style>

Autor

非常感谢,起作用了,但是我的html和css技术太差了,想要实现其他的效果我还要继续努力,再次感谢!

Autor

Thank you very much, it works, but my HTML and CSS technology is too poor, I have to continue to work hard to achieve other effects, thank you again!

Verknüpfte Beiträge Antworten Ansichten Aktivität
0
März 25
630
1
März 25
869
2
Juli 24
3720
4
Mai 24
11302
1
Mai 24
1736