实例:白桃粉可爱风的立体字时钟
技术栈:HTML+CSS+JS
效果:
源码:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
<title>白桃粉可爱风的立体字时钟</title>
<link rel="stylesheet" href="../css/72.css">
<script type="text/javascript">
function myTime(){
let time=new Date();
let hh=time.getHours(); //时
let mm=time.getMinutes(); //分
let ss=time.getSeconds(); //秒
// Math.floor() 向下取整