How do I Make Firefox Print a Background-Color Style?

后端 未结 8 1058
臣服心动
臣服心动 2020-11-29 08:14

I have some simple CSS:

#someElement {
    background-color:black;
    color:white;
}

It looks ok in the browser, but when I go to print it

8条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-29 08:42

    For chrome you can use this:

    -webkit-print-color-adjust:exact;
    

    Or in print preview, tick the More settings->Background Graphics

    For Firefox, you can't enable it using any CSS. You can enable it as follow (If you don't see the File, press Alt key once).

    File->Page setup and tick the Print Background(color & images)

提交回复
热议问题