我的代码正在工作
<!DOCTYPE html> <html> <body style="position:fixed; top:0px; left:0px;bottom:0px; right:0px; margin:0px;"> <div style="height:100%; width:100%; border:solid;"></div> </body> </html>
但是当我添加显示器时不起作用:table-cell;到div使用垂直对齐
<!DOCTYPE html> <html> <body style="position:fixed; top:0px; left:0px;bottom:0px; right:0px; margin:0px;"> <div style="height:100%; width:100%; border:solid; display:table-cell;vertical-align:middle;"></div> </body> </html>
我想让div覆盖整个身体的空白空间