관리 메뉴

Silver Library (Archived)

[JS] Resize the screen, then change the colour 본문

Personal DB/Mainly for Front-end

[JS] Resize the screen, then change the colour

Chesed Kim 2020. 11. 26. 16:29
반응형

stackoverflow.com/questions/29515624/how-would-i-change-the-background-color-of-an-html-file-if-the-screen-size-is-to

 

How would I change the background color of an HTML file if the screen size is too small using a javascript function?

How would I change the background color of an HTML file if the screen size is too small using a javascript function? For example I need the background of my HTML file to be gray but if the window s...

stackoverflow.com

stackoverflow.com/questions/29515624/how-would-i-change-the-background-color-of-an-html-file-if-the-screen-size-is-to/29515904

Math.floor() - JavaScript | MDN (mozilla.org)

 

Math.floor()

Math.floor() 함수는 주어진 숫자와 같거나 작은 정수 중에서 가장 큰 수를 반환합니다.

developer.mozilla.org

JavaScript floor() Method (w3schools.com)

 

JavaScript floor() Method

JavaScript floor() Method Example Round a number downward to its nearest integer: Math.floor(1.6); The output of the code above will be: 1 --> Try it Yourself » More "Try it Yourself" examples below. Definition and Usage The floor() method rounds a number

www.w3schools.com

If I need to treat scale thing, consider to find a solution or similar things from math applying.

'Personal DB > Mainly for Front-end' 카테고리의 다른 글

JS - something ++, 루프와 반복.  (0) 2021.03.16
[basic] The web and web standards  (0) 2021.02.28
JavaScript - explanation of 'Property'  (0) 2020.11.26
What is DOM?  (0) 2020.11.25
Example of 'Array inside a JS Object'  (0) 2020.11.24