Fit Image inside a photo frame using jquery

I want to add the uploaded image to the white area inside the frame. How to do that please help. Is there any library or plugin for that.

enter image description here

1 thought on “Fit Image inside a photo frame using jquery”

  1. .outer{
      background-image: url(https://i.stack.imgur.com/kZfgh.jpg);
      width: 200px;
      height: 300px;
      background-size: contain;
      border: 1px solid red;
      position: relative;
    }
    
    .inner{
      position: absolute;
      background-color: red;
      top: 116px;
      left: 45px;
      width: 110px;
      height: 138px;
    }
    <div class="outer">
      <div class="inner">
      Hello
      </div>
    </div>
    Reply

Leave a Comment