css – How can I shrink an image by half?

I’m trying to shrink an image in response. In my CSS file, there is this code to shrink the image. However, the picture shown was not perfect.

In my code I tried to shrink it to half but it didn’t work as I expected. Can you tell me how I can change the size of the image to 50% or X% of the current size?

    .logo{
    width: 50%;
    height: 50%;
}

Add a Comment

Your email address will not be published. Required fields are marked *