0
嘿即时通讯制作一个html文件,我想要它,这样当有人访问该页面并且有noscript启用,它会使整个页面变黑并显示白色文本说“启用JavaScript” 这里是我的代码:noscript风格没有工作
<noscript>
<style>
.noscript{
width: 4000px;
height: 4000px;
position: fixed;
top: 50%;
left: 60%;
transform: translate(-50%, -50%);
background: black;
}
.noscriptext{
width: 400px;
height: 100px;
position: fixed;
top: 40%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center; font-size: 100%;
color: white;
}
</style>
<div class="noscriptext"><h1>to use this you must enable javascript</h1></div>
</noscript>
<div class="noscript"> </div>
,但它不工作帮助吗? 我试过这个: Body styling for a noscript tag?但没有。 图片:http://imgur.com/a/KRqXS