、、、
、-
-
通用屬性:
CSS(層疊樣式表)
selector {
property: value;
}
-
選擇器:
-
元素、.class、#id、元素.class、元素#id
- 偽類::hover、:active、:focus
- 偽元素:::before, ::after
-
版面技巧:
.container {
display: flex;
justify-content: center;
align-items: center;
flex-direction: row; /* or column */
}
.grid-container {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
}
-
定位:
-
盒子模型:
div {
margin: 10px;
padding: 20px;
border: 1px solid #000;
}
@media screen and (max-width: 768px) {
.container {
display: block;
}
}
JavaScript
let variable = "value"; // Mutable
const constant = "value"; // Immutable
function myFunction() {
console.log("Hello");
}
const myArrowFunction = () => console.log("Hello");
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Title</title>
</head>
<body>
<header></header>
<main></main>
<footer></footer>
</body>
</html>
-
陣列方法:
-
映射(),過濾器(),減少(),forEach()
selector {
property: value;
}
React.js(基礎)
.container {
display: flex;
justify-content: center;
align-items: center;
flex-direction: row; /* or column */
}
.grid-container {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
}
div {
margin: 10px;
padding: 20px;
border: 1px solid #000;
}
@media screen and (max-width: 768px) {
.container {
display: block;
}
}
版本控制 (Git)
-
基本指令:
-
git init - 初始化儲存庫
-
git status - 檢查目前狀態
-
git 新增 . - 暫存所有變更
-
git commit -m "Message" - 提交更改
-
git push - 推送到遠端儲存庫
-
git pull - 取得更新
常用工具
-
npm(節點套件管理器)指令:
-
npm install ; - 安裝軟體包
-
npm start - 啟動應用程式
-
程式碼格式化程式:
-
Prettier - 自動格式化程式碼
-
ESLint - 檢查潛在錯誤