关于弹窗的制作这里写的时候出现了很多问题,首先就是对齐的问题,以前我也觉的对比不是挺简单的嘛,真的是完全错了,这是简直是一场噩梦,真的被搞的头大,所以这里我会用两种方式来体现所谓 的无奈!废话不多说,直接贴代码。
第一种 的形式:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
body{
background-color: gray;
}
.box form{
width: 500px;
height: 300px;
background-color: white;
border: 1px solid #000;
/* 其实在我看来这一类的弹窗制作都可以用固定定位来做,比较方便,容易把握位置 */
position: fixed;
top: 50%;
left: 50%;
margin-top: -