js+css实现雨滴下雨动画效果代码
代码语言:html
所属分类:动画
代码描述:js+css实现雨滴下雨动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Realistic Raindrops on Glass</title> <style> /* Soft frosted glass background */ body { background: url("//repo.bfw.wiki/bfwrepo/image/637acaade2b64.png") no-repeat ; background-size: cover; display: flex; justify-content: center; align-items: center; height: 100vh; overflow: hidden; position: relative; } /* Glass effect */ .glass-panel { width: 100vw; height: 100vh; position: absolute; background: rgba(255, 255, 255, 0.2); backdrop-filter: blur(2px); box-shadow: inset 0px 10px 50px rgba(255, 255, 255, 0.3); } /* Drop container */ .rain-container { position: absolute; width: 100%; height: 100%; overflow: hidden; } /* Raindrop (randomized tear shape) */ .drop { position: absolute; background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.9) 10%, rgba(173, 216, 230, 0.2) 80%); box-shadow: inset -8px -8px 18px rgba(255, 255, 255, 0.8), 0px 8px 15px rgba(255, 255, 255, 0.3); filter: blur(0.5px); .........完整代码请登录后点击上方下载按钮下载查看
网友评论0