以下是一个示例,使用 HTML, CSS 和 JavaScript 实现网页以 div 层弹出显示消息的效果:
<!DOCTYPE html>
<html>
<head>
<style>
#message {
display: none;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: #fff;
padding: