|Written by Wayne Ye Wednesday, September 28, 2011|
Per project needs we need print part of a web page, which I have no idea when I saw this requirement, I googled and I read this post: http://www.huntingground.freeserve.co.uk/main/mainfram.htm?../scripts/printing.htm, it basically use
Occasionally I tried to find out whether CSS can achieve such function, seemed I was on the right way: CSS media types is to control different display settings on different "media", controled completely by your own. What a shame to myself! CSS media types definiton from W3C official page:
We can define print style by few ways:
I'd reccomended option 1 or 3 if the project is small.
In additional I occasionally found that the Web Development extetion for Chrome already support this, we don't have to waste many pieces of papers.