JSFiddle - React, Tailwind, and code Playground

HTML

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>Transition of background-position</title>
    <style>
        .foo {
            background-image: url('https://emojipedia-us.s3.amazonaws.com/thumbs/120/google/119/dog-face_1f436.png');
            background-repeat: no-repeat;
            transition: background-position 1s;
            width: 400px;
            height: 200px;
        }

        .foo:hover {
            background-position: right  bottom;
        }

        .foo1 {
            background-color: lightgreen;
            background-position: left  bottom;
        }

        .foo2 {
            background-color: pink;
            background-position: right 10px top;
        }
    </style>
</head>
<body>
    <div class="foo foo1"></div>
    <div class="foo foo2"></div>
</body>
</html>