我正在使用 Primefaces 5.1。在我的页面中,我使用对话框和高度属性。我需要将屏幕尺寸设置为对话框高度的 70%,因为屏幕高度与所有系统不同,所以我需要设置动态高度。我需要使用什么 javascript 或 css 来根据高度设置屏幕?
<p:dialog widgetVar="dialogWidget" id="dialogId" position="center,top" height="height to set">
........
</p:dialog>
最佳答案
<p:dialog style="height: 70vh" ...
或 <p:dialog height="70vh" ...
关于javascript - Primefaces 对话框设置高度的一半屏幕大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35167085/