<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <style type="text/css"> *{ margin: 0 ; padding: 0; } span{ border: 1px solid #333; } div{ display: flex; justify-content:center;/*x軸對齊方式*/ align-items:center; /*y軸對滴方式*/ height: 100vh; /**屏幕高度百分百*/ } </style> </head> <body> <div><span>內容所在區域</span></div> </body> </html>