react viewport height:用于将React设置为等于实际浏览器内部窗口高度的100vh的实用程序 源码
react-viewport-height React的实用程序,可将100vh设置为等于实际浏览器内部窗口的高度。 由于vh在移动浏览器上有麻烦(主要是由于地址栏),因此有一些技巧可以解决它。 该软件包实现了的一个。 用法 npm install react-viewport-height // index.js import useVH from 'react-viewport-height' ; import './index.css' ; const App = ( ) => { useVH ( ) ; return ; } ; /* index.css */ . app { min-height : calc ( var ( --vh , 1 vh ) * 100 ); } 阅读以获取更多详细信息。 您
下载地址
用户评论