div+css实现6种定位点标注点圆点闪烁动画效果代码
代码语言:html
所属分类:动画
代码描述:div+css实现6种定位点标注点圆点闪烁动画效果代码
代码标签: div css 定位点 标注点 圆点 闪烁 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <title>平面图定位闪烁效果</title> <style> /* 基础样式 */ body { font-family: Arial, sans-serif; background-color: #f5f5f5; margin: 0; padding: 20px; } .container { max-width: 1000px; margin: 0 auto; } h1 { text-align: center; color: #333; } /* 平面图容器 */ .floor-plan { position: relative; width: 800px; height: 500px; background-color: #fff; border: 2px solid #ddd; margin: 20px auto; background-image: url('https://via.placeholder.com/800x500/eeeeee/cccccc?text=平面图背景'); background-size: cover; } /* 通用定位标记样式 */ .location-marker { position: absolute; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; color: white; font-weight: bold; box-shadow: 0 2px 5px rgba(0,0,0,0.2); } /* 1. 基础闪烁效果 */ .blink-basic { animation: blinkBasic 1.5s infinite; } @keyframes blinkBasic { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } } /* 2. 脉冲闪烁效果 */ .blink-pulse { animation: blinkPulse 2s infinite; } @keyframes blinkPulse { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7); } 70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(255, 0, 0, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); } } /* 3. 颜色交替闪烁 */ .blink-color { animation: blinkColor 2s infinite; } @keyframes blinkColor { 0%, 100% { background-col.........完整代码请登录后点击上方下载按钮下载查看
网友评论0