Notice
Recent Posts
Recent Comments
Link
Silver Library (Archived)
CSS - height, calc, vh? 본문
Face the fear, build the future/Revision Sector
CSS - height, calc, vh?
Ayin Kim 2022. 12. 11. 23:45반응형
tl;dr - Let me know how height's vh, calc can be used as professional.
Note:
That means width: 100vw works. To let it fill the whole width, then use it so instead 100% width.
Sauce.
VH
height: 100vh; means the height of this element is equal to 100% of the viewport height.
example: height: 50vh;
If your screen height is 1000px, your element height will be equal to 500px (50% of 1000px).
CALC
height: calc(100% - 100px); will calculate the size of the element by using the value of the element.
example:
height: calc(100% - 100px); If your screen height is 1000px, your element height will be equal to 900px (100% of 1000px and minus 100px).
*I think your former developer didn't need to use calc() if he/she didn't want to calculate value.
'Face the fear, build the future > Revision Sector' 카테고리의 다른 글
React-router-dom 에서 next.js 사용하기 - 1 (0) | 2022.12.15 |
---|---|
React.js 로 '아니메 전시' 앱 만들기. (0) | 2022.12.13 |
Basic - How to do a side project (0) | 2022.12.10 |
revision - react state management (0) | 2022.12.10 |
CORS policy issue 에 대한 고찰. (0) | 2022.12.06 |