运用margin特性将1个div水平垂直居中

2021-03-08 12:53 jianzhan

拷贝编码
编码以下:

<%@ page language="java" import="java.util.*" pageEncoding="utf⑻"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'margin.jsp' starting page</title>
<style>
div{
height:100px;
width:1002px;
background:yellow;
margin:0px auto;
}
</style>
</head>
<body>
<div></div>
</body>
</html>