1、html页面代码:
*{
margin: 0;
padding: 0;
}
ul li{
float: left;
200px;
height: 50px;
text-align: center;
list-style: none;
border: 0.1px solid #000;
line-height: 50px;
color:#fff;
}
.red{
background: red;
}
.blue{
background: blue;
}
.green{
background: green;
}
- 1
- 2
- 3
2、nodejs 代码:
************************创建服务器**************************
var http=require("http");
var url=require("url");
var router=require("./02.js")
http.createServer(function(req,res){
if(req.url!="/favicon.ico"){
console.log(&