css部分 h1 { font-size: 30px; color: orangered; text-align: center; margin: 100px 0; } html部分 <h1 id="h1">距离秒杀时间还剩03天20小时30分钟20秒</h1> js部分 //获取元素 var h1