2020
10-10
10-10
js实现星星海特效的示例
首先需要获取屏幕大小:varscreenWidth=document.documentElement.clientWidth;varscreenHeight=document.documentElement.clientHeight;接着可以定义动画(星星透明度):@keyframesflash{0%{opacity:0}25%{opacity:0.25}50%{opacity:0.5}75%{opacity:0.75}100%{opacity:1}}全部代码如下:<!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><title>Title</title><style>div{w...
继续阅读 >