<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> body{ color: #4ac94a; } .content{ width: 300px; height: 300px; background-color: #0d61b3; position: fixed; text-align: center; line-height: 300px; left: 0; right: 0; margin: 0 auto; top: 50%; transform: translate(0, -50%); } </style> </head> <body> <div class="content">neir</div> </body> </html>