Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
2583 Näkymät

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
Hylkää
Paras vastaus

Hello drt,


try following code for apply background color

background-color:#E0E0E0;


Avatar
Hylkää
Tekijä

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>

Tekijä

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>

Tekijä

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

Tekijä

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!

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
0
maalisk. 25
630
1
maalisk. 25
869
2
heinäk. 24
3720
4
toukok. 24
11302
1
toukok. 24
1736