+ 3
Q. What's the difference between these css codes?
100vh 100% 100v 100%v 100%vh 100px What's the difference between all these above css codes, how do they affect the output? Which one is a better option?
2 ответов
+ 3
100px - it defines the pixelated size of something...
100% - it defines the size by relating to others like, the device size is 1000 px and you do want to give style related to that of device size 1000px to 100%..
100vh - it either defines the device viewport relative units...
100vh means to express 100%
+ 2
100% is 100% width/height of its parent width/height.
And 100vh is not means 100% unless its parent is 100vh height.