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 |
Tags
- tailwindcss
- express.js
- concept
- blockchain
- error
- Props
- evm
- node.js
- nextJS
- CSS
- typeScript
- Interface
- Redux
- Ethereum
- web
- graphQL
- bitcoin
- HTML
- JavaScript
- built in object
- 기준
- API
- CLASS
- solidity
- REACT
- middleware
- 삶
- useState
- hardhat
- SSR
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