question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

how to show css with html?

See original GitHub issue

hi,i use
<script type="text/javascript" src="https://printjs-4de6.kxcdn.com/print.min.js"></script>

printJS({
  	    printable: 'canvas',
  	    type: 'html',
           showModal: true,
	     })

and the pdf like the photo… it doesn’t show css with li or background color,float and so on… how can i do , can show the css stylesheet?? 1533528062814

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
crabblycommented, Aug 6, 2018

Try this:

printJS({
  printable: 'canvas',
  type: 'html',
  showModal: true,
  targetStyles: ['*']
})
1reaction
zhuyinjingcommented, Aug 7, 2018

all right… thanks a lot!

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS Layout - The display Property - W3Schools
The display property specifies if/how an element is displayed. Every HTML element has a default display value depending on what type of element...
Read more >
How to Include CSS in HTML Pages - Tutorial Republic
Tip: The type attribute of the <style> and <link> tag (i.e. type="text/css" ) defines the language of the style sheet. This attribute is...
Read more >
How can i preview my html and ccs? - Codecademy
Just open the html file with any browser (double-click). Some text-editors also allow the option of running the code in a browser. And...
Read more >
How to Link CSS to HTML Files in Web Development - Hostinger
Check that your files are in the same folder if you have trouble linking your CSS to HTML. Check that the file path...
Read more >
CSS tutorial starting with HTML + CSS - W3C
Words within < and > are called tags and, as you can see, the document is contained within the <html> and </html> tags....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found