麻烦老师看看对吗?
来源:2-12 自由编程
淡淡嚣风
2021-07-25 21:30:02
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
.box {
position: absolute;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, .6);
}
.box .inner {
position: relative;
width: 50%;
background-color: #fff;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
border-radius: 8px;
}
.box .inner p {
text-align: center;
padding: 20px;
}
.box .inner div {
display: flex;
justify-content: center;
}
button {
display: flex;
justify-content: center;
width: 30%;
height: 30px;
justify-content: center;
align-items: center;
margin: 20px 5px;
border-radius: 10%;
outline: none;
border: none;
color: #fff;
}
.xuanzhong {
background-color: #005ab5;
}
.wei {
background-color: #9d9d9d;
}
</style>
</head>
<body>
<div class="box">
<div class="inner">
<p>确认要删除吗?</p>
<div>
<button class="xuanzhong">确认</button>
<button class="wei">取消</button>
</div>
</div>
</div>
</body>
</html>
1回答
好帮手慕久久
2021-07-26
同学你好,代码正确,很棒,不需要优化,祝学习愉快!
相似问题