1. <!DOCTYPE html>
    2. <html lang="en">
    3. <head>
    4. <meta charset="UTF-8">
    5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
    6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
    7. <title>Document</title>
    8. <style>
    9. .parent {
    10. width: 300px;
    11. height: 300px;
    12. background: url('images/timg.jpg') no-repeat center center;
    13. background-size: cover;
    14. border: 1px solid #333;
    15. position: relative;
    16. overflow: hidden;
    17. }
    18. .cover {
    19. position: absolute;
    20. width: 100%;
    21. height: 100%;
    22. right:-100%;
    23. bottom: 0;
    24. background: rgba(209, 123, 123, .5);
    25. transition: all 1s;
    26. transform-origin: left bottom;
    27. }
    28. .parent:hover .cover{
    29. transform: rotate(-90deg)
    30. }
    31. </style>
    32. </head>
    33. <body>
    34. <div class="parent">
    35. <div class="cover">
    36. </div>
    37. </div>
    38. </body>
    39. </html>

    box.gif