250x250
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- CLASS
- middleware
- web
- JavaScript
- Interface
- API
- SSR
- evm
- built in object
- graphQL
- 기준
- REACT
- Redux
- tailwindcss
- node.js
- solidity
- Ethereum
- nextJS
- express.js
- error
- 삶
- bitcoin
- Props
- hardhat
- CSS
- useState
- concept
- HTML
- typeScript
- blockchain
Archives
- Today
- Total
ReasonJun
CSS : Basic (declaration method, css selector) 본문
728x90
declaration method
built-in way
<style>
div {
color: red;
margin: 20px;
}
</style>
inline method
<div style="color: red; margin: 20px;"></div>
Link method ⇒ Parallel method
<link rel="stylesheet" herf="./css/main.css">
import method
@import url("./box.css");
css selector
basic
// Universal Selector
* {
color: red;
}
// Type Selector
li {
color: red;
}
// Class Selector
.orange {
color: red;
}
// ID Selector
#orange {
color: red;
}
complex
// Basic Combinator
span.orange{
color: red;
}
// Child Combinator
ul > .orange {
color: red;
}
// Descendant Combinator
div .orange {
color: red;
}
// Adjacent Sibling Combinator
.orange + li {
color: red;
}
// General Sibling Combinator
.orange ~ li {
color: red;
}
728x90
'Frontend > CSS' 카테고리의 다른 글
CSS : display / opacity / font / character / background (0) | 2023.06.05 |
---|---|
CSS : properties (2) (border, box-sizing, overflow) (0) | 2023.06.05 |
CSS : Properties (1) (uint, width, height, margin, padding) (0) | 2023.06.05 |
CSS : selector priority / style inherit (0) | 2023.06.05 |
CSS : Pseudo-Classes / Pseudo-Elements / Attribute (0) | 2023.06.05 |
Comments