div.otto{ display: block; position: fixed; right: 0; bottom: 0; width: min-content; align-items: right; &:hover{ transform: rotate(-3deg) translate(0, 3%); } &:active{ transform: rotate(-1deg) translate(0, 5%); } } div.otto .tips{ display: flex; position: absolute; background-color: #fff; border-radius: 8px; padding: 10px; color: #000; width: 100%; } div.otto img{ display: block; transition: transform 0.5s; height: 100%; } @media screen and (min-width: 1080px){ div.otto{ transition: transform 0.5s; height: 350px; } } @media screen and (max-width: 1080px){ div.otto{ transition: transform 0.5s; height: 200px; } } @media screen and (min-width: 768px){ div.otto{ transition: transform 0.5s; opacity: 100%; } } @media screen and (max-width: 768px){ div.otto{ transition: transform 0.5s; opacity: 0; } }