Simple node.js server that sends html+css as response

前端 未结 2 471
無奈伤痛
無奈伤痛 2020-12-13 02:48

I\'ve created basic http server that sends html file as response. How can I send css file as well so client using browser will see a html using css ?

The code I have

2条回答
  •  感动是毒
    2020-12-13 03:29

    Integrate the CSS right into your AppClient.html file. There are different ways to do so:

    External CSS file

    Create a styles.css file (or any other file name) in the same directory as your html file. Then add

    
    

    to your section of your HTML document.

    OR

    Right in your HTML file

    Add a

    
    

    to your section of your HTML document.

提交回复
热议问题