Maintain padding when scaling image inside fixed size container
问题 I'm trying to create a zoom effect by using CSS transition to grow an image inside a fixed size container on hover. The container frame has a border and padding, and I would like them to stay when the image grows. The problem is that when it grows, the padding on the right and bottom disappear. Here is the CSS code: .videoframe { width: 200px; height: 113px; border: solid 2px; border-radius: 20px; margin-right: 20px; margin-bottom: 20px; padding: 10px; overflow: hidden; } .videoframe img {