本节主要复习的知识点:
- 计算机是如何存储数据的
- 软件安装
- 命令行基础
- 脚本
- HTTP 入门
- Node.js Server
- HTML
- CSS
-
计算机是如何存储数据的:
ASCII码、GBK、unicode、UTF-8.......
- 命令行基础:
- pwd progress working dir
- cd change dir
- mkdir make dir
- touch
- echo "hi" > 1.txt
- echo "hi" >> 1.txt 追加
- echo "hi" >! 1.txt 强制覆盖
- cp -r copy -recursive
- rm -rf remove -recursive/force
- mv
- tree windows里无
- git init
- git add xxx
- git commit -m"xxx"
- git pull
- git push
- git clone
- curl -L http://www.baidu.com L-重定向
- curl -s -v http://www.baidu.com 用来显示请求/响应
- ping qq.com
- hexo init
- hexo g
- hexo server
- hexo deploy
-
HTTP入门
请求与响应实例:
a. GET请求与响应
curl -s -v -H "Frank: xxx" -H "fr: yyy" -- "https://www.baidu.com"
请求内容:> GET / HTTP/1.1 > Host: www.baidu.com > User-Agent: curl/7.55.0 > Accept: */* > Frank: xxx > fr: yyy >
响应:
< HTTP/1.1 200 OK < Accept-Ranges: bytes < Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform < Connection: Keep-Alive < Content-Length: 2443 < Content-Type: text/html < Date: Mon, 23 Apr 2018 07:23:45 GMT < Etag: "5886041d-98b" < Last-Modified: Mon, 23 Jan 2017 13:24:45 GMT < Pragma: no-cache < Server: bfe/1.0.8.18 < Set-Cookie: BDORZ=27315; max-age=86400; domain=.baidu.com; path=/ < { [1040 bytes data]
b. POST请求
curl -X POST -d "1234567890" -s -v -H "Frank: xxx" -- "https://www.baidu.com"
请求内容:> POST / HTTP/1.1 > Host: www.baidu.com > User-Agent: curl/7.55.0 > Accept: */* > Frank: xxx > Content-Length: 10 > Content-Type: application/x-www-form-urlencoded > } [10 bytes data]
html入门:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>草稿测试</title>
</head>
<body>
hello
</body>
</html>
注意:
- <meta charset="UTF-8">,如果后台后设置charset,则以后台为准,权重:后台协议>前端内容;如果浏览器上显示为乱码,什么原因????
- css入门:
- 想要自己找一些好看的页面素材以及psd可以访问以下两个网站;
- margin与padding---用哪一个可以实现效果就用哪一个,padding与border-box配合使用不错;