{
  "id": "ken-burns-effect",
  "name": "Ken Burns Effect",
  "category": "effects",
  "tags": [
    "ken burns",
    "slow zoom",
    "pan",
    "hero image",
    "animation",
    "slideshow"
  ],
  "description": "A slow, cinematic zoom-and-pan on a hero image, looping back and forth inside a cropped frame.",
  "url": "https://copy-css.com/snippets/ken-burns-effect",
  "markdown": "https://copy-css.com/snippets/ken-burns-effect.md",
  "html": "<div class=\"ken-burns\">\n  <img src=\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 40'%3E%3Cdefs%3E%3ClinearGradient id='s' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23f472b6'/%3E%3Cstop offset='1' stop-color='%23fdba74'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='60' height='40' fill='url(%23s)'/%3E%3Ccircle cx='42' cy='15' r='7' fill='%23fef08a'/%3E%3Cpath d='M0 40V26l12-8 10 7 9-5 14 9 15-6v17z' fill='%237c3aed'/%3E%3Cpath d='M0 40v-8l16-5 12 4 14-6 18 6v9z' fill='%234c1d95'/%3E%3C/svg%3E\" alt=\"Purple hills under a pink sunset\" width=\"260\" height=\"160\">\n</div>",
  "css": ".ken-burns {\n  width: 260px;\n  height: 160px;\n  overflow: hidden;\n  border-radius: 14px;\n}\n\n.ken-burns img {\n  display: block;\n  width: 100%;\n  height: 100%;\n  object-fit: cover;\n  transform-origin: 70% 40%;\n  animation: ken-burns-move 14s ease-in-out infinite alternate;\n}\n\n@keyframes ken-burns-move {\n  from {\n    transform: scale(1) translate(0, 0);\n  }\n\n  to {\n    transform: scale(1.3) translate(-4%, 3%);\n  }\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .ken-burns img {\n    animation: none;\n  }\n}",
  "features": [
    "keyframe animations",
    "transforms",
    "reduced-motion support"
  ],
  "customProperties": []
}
