UNPKG
quicint
Version:
latest (0.7.5)
0.7.5
0.7.4
0.7.3
0.7.2
0.7.1
0.7.0
0.6.8
0.6.7
0.6.6
0.6.5
0.6.4
0.6.3
0.6.2
0.6.1
0.6.0
0.5.1
0.5.0
0.4.0
0.3.0
0.2.0
0.1.0
Quick initialize HTML5 EJS Boilerplate
github.com/TsubasaHiga/Quicint
TsubasaHiga/Quicint
quicint
/
src
/
assets
/
scripts
/
utils
/
set100vh.ts
11 lines
(9 loc)
•
307 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
/** * CSS変数に100vhをセットします *
@link
https://css-tricks.com/the-trick-to-viewport-units-on-mobile/ */
const
Set100
vh = (setProperty =
'--vh'
):
void
=>
{
const
vh =
window
.
innerHeight
*
0.01
document
.
documentElement
.
style
.
setProperty
(setProperty,
`
${vh}
px`
) }
export
default
Set100
vh