实现效果:
实现原理:
给关闭按钮绑定点击事件,点击以后触发动画效果。利用jQuery的animate方法,先让显示天气的盒子高度变为0,接着让整个包含天气和事件的盒子宽度变为0,最后通过将display属性值设为none,使得close按钮消失。
实现代码:
仿360开机效果 *{ padding: 0; margin: 0; } .box{ width: 320px; position: fixed; bottom: 0; right: 0; box-shadow: 1px 1px 10px #2d2d2d; } #close{ position: absolute; top: 0; right: 0; width: 30px; height: 20px; cursor: pointer; background-color: red; color: pink; font-weight: bold; text-align: center; } .hd{ width: 320px; height: 300px; background-color: #03c03c; color: #fff; font-size: 70px; line-height: 300px; text-align: center; } .bd{ width: 320px; height: 100px; background-color: #fffc00; font-size: 30px; line-height: 100px; text-align: center; } X 1分12秒 天气:晴天
PS:JS 实现时间倒计时
总结
以上所述是小编给大家介绍的javascript+jQuery实现360开机时间显示效果,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对考高分网网站的支持!



