1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
.overlay { position: fixed; z-index: 1000; top: 0; right: 0; left: 0; bottom: 0; // background: rgba(255, 255, 255, 0.5); background: #444; } .content { outline: none; position: absolute; color: #ddd; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #444; padding: 20px; // border: 1px solid #ccc; border-radius: 10px; }