Specify hairline thickness in CSS for printing

后端 未结 6 1354
失恋的感觉
失恋的感觉 2021-02-01 23:56

If I have a print CSS styling an element with:

border:1px solid black;

or:

border:0.25pt solid black;

The lin

6条回答
  •  醉话见心
    2021-02-02 00:26

    Problem might be in browser rescaling the page (at least IE used to do it when printing), but as I tested it now in Opera (no rescale), line still isn't really thin as hairline. However, I am always using this to achieve thin border effect:

    p {
      border: 0.4pt solid #CCC;
    }
    

    This will create very light gray border. As Barry Kaye has proposed, you can also make it dotted to look thinner.

提交回复
热议问题