Customized browser home page, the browser's home screen background can be replaced by a full-screen browser can
order to have a concise, only pure black background (in favor of focus), and can display the
background of the time, you do not need to download third-party software, this is a good program.
Programming 1
Page document completed as follows:
home.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>主页</title>
<link href="home.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
</head>
<body>
<div id="text">
</div>
</body>
<script type="text/javascript" src="home.js"></script>
</html>
home.css
html{
width: 100%;
height: 100%;
margin: 0;
}
body{
background: #000;
}
#text{
/*设置容器外界位置:居中*/
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
/*设置容器内部文本:颜色和大小*/
color: #080808;
font-size: 150pt;
}
home.js
function update_time(){
// 获取时间
let now=new Date();
now.getHours();
now.getMinutes();
//显示时间
document.getElementById("text").innerHTML=now.getHours()+" "+now.getMinutes();
}
update_time();
setInterval(update_time,1000*60);
2 Deployment
- Server windows server 2012
- Reference mounting portion
- Reference to deploy parts of the site
3 use
- Use crome browser
- Set browser home page
- Home Open button
- Press F11 to enter full-screen, the screen can be used as wallpaper, call the browser using Ctrl + N
- From a distance, all-black screen as the computer turned off, close look can always view the time
- Home URL: http://192.144.128.106/