![]() You just have to ensure that the SVG file has none of these properties set in the tag: height If your image is an SVG, which is a variable-sized vector image format, you can have the expansion to fit the container happen automatically. If your image is landscape, and your container is portrait, you must set width="100%" on the image.If your image is portrait, and your container is landscape, you must set height="100%" on the image.If your image and container are both "portrait shaped" or both "landscape shaped" (taller than they are wide, or wider than they are tall, respectively), then it doesn't matter which of height or width are "%100". ![]() If you set both to "100%", your image will be stretched.Ĭhoosing whether to do height or width depends on your image and container dimensions: To resize an image proportionally, you have to set either the height or width to "100%", but not both. Currently there is no way to do this correctly in a deterministic way, with fixed-size images such as JPEGs or PNG files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |