你能否完全用html语言写一个赛博朋克风格的公告(最好能酷炫一点)注意要有关闭公告的按钮,无法关闭公告就不需要
时间: 2023-05-27 21:02:05 浏览: 38
能。以下是一个用HTML语言写的赛博朋克风格公告,带关闭按钮:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>赛博朋克公告</title>
<style>
/* 定义样式 */
body {
background-color: #000;
display: flex;
justify-content: center;
align-items: center;
height: 100%;
}
.popup {
background-color: #333;
color: #fff;
font-family: sans-serif;
font-size: 16px;
padding: 20px;
border-radius: 10px;
box-shadow: 0px 0px 10px rgba(255, 255, 255, .1);
max-width: 80%;
text-align: center;
}
.popup h1 {
font-size: 24px;
margin-top: 0;
}
.close {
position: absolute;
top: 20px;
right: 20px;
cursor: pointer;
font-size: 24px;
}
.close:hover {
color: #ff0;
}
</style>
</head>
<body>
<div class="popup">
<span class="close">×</span>
<h1>赛博朋克公告</h1>
<p>尊敬的用户,我们将于下周一进行系统升级,届时将会暂停服务一段时间,请您做好服务中断的准备。</p>
<p>我们会尽快完成升级,并恢复正常服务。感谢您的理解和支持!</p>
</div>
<script>
// 关闭按钮的功能
var closeBtn = document.querySelector('.close');
var popup = document.querySelector('.popup');
closeBtn.onclick = function() {
popup.style.display = 'none';
}
</script>
</body>
</html>
相关推荐











以下是一个赛博朋克风格的HTML个人主页示例:
html
<!DOCTYPE html>
<html>
<head>
<title>赛博朋克个人主页</title>
<style>
body {
background-color: #000;
color: #fff;
font-family: Arial, sans-serif;
font-size: 16px;
line-height: 1.5;
}
h1 {
font-size: 48px;
margin-top: 100px;
text-align: center;
text-shadow: 0 0 10px #fff;
}
p {
margin: 20px 0;
text-align: center;
}
.container {
display: flex;
flex-wrap: wrap;
justify-content: center;
margin-top: 50px;
}
.box {
background-color: #fff;
border-radius: 10px;
box-shadow: 0 0 10px #fff;
margin: 20px;
padding: 20px;
text-align: center;
width: 300px;
}
.box h2 {
font-size: 24px;
margin-top: 0;
}
.box p {
font-size: 18px;
margin: 10px 0;
}
.box a {
background-color: #f00;
border-radius: 5px;
color: #fff;
display: inline-block;
margin-top: 10px;
padding: 10px 20px;
text-decoration: none;
transition: background-color 0.3s ease;
}
.box a:hover {
background-color: #00f;
}
</style>
</head>
<body>
赛博朋克个人主页
欢迎来到我的个人主页,这里是一个赛博朋克风格的页面。
个人简介
我是一名赛博朋克爱好者,喜欢探索未来科技的可能性。
了解更多
最新作品
我最近完成了一个赛博朋克风格的网站设计,欢迎来观赏。
查看作品
联系方式
如果你对我的作品感兴趣,可以通过以下方式联系我。
发送邮件
</body>
</html>




