div+css实现鼠标悬浮摇晃的水瓶效果代码
代码语言:html
所属分类:其他
代码描述:div+css实现鼠标悬浮摇晃的水瓶效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> @import url('https://fonts.googleapis.com/css2?family=Anton&display=swap'); * { margin: 0; padding: 0; box-sizing: border-box; transition: 1s; } body { width: 100%; height: 100vh; display: flex; justify-content: center; align-items: center; background: rgb(238,174,202); background: linear-gradient(90deg, rgba(238,174,202,1) 0%, rgba(148,187,233,1) 100%); } .title { position: absolute; top: 0; text-transform: uppercase; font-family: 'Anton', sans-serif; -webkit-text-stroke: 1px #fff; color: transparent; font-size: 8em; text-shadow: 0 0 1em rgb(0,0,0,0.2); animation: pulse 1s ease infinite; z-index: 1; } .title:after { content: ''; position: absolute; top: 1.2em; left: -1em; width: 6em; height: 0.1em; background: rgb(0,0,0); background: radial-gradient(circle, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 100%); filter: blur(0.1em); border-radius: 50%; } .bottle { position: absolute; width: 5em; height: 18em; background: #eee; background: linear-gradient(90deg, #eee 0%, #fff 20%, #ddd 57%, #eee 100%); border-radius: 35% 35% 0 0; border-top: 1px solid #fff; z-index: 2; } .bottle:before { content: ''; width: 1.6em; height: 1em; position: absolute; left: 1.6em; top: -1.5em; background: #eee; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0