5
Answers

stretch image according to the screen

Ask a question
darma teja

darma teja

11y
1.8k
1
Hi All,

I would like to fit an svg image to fit according to browser window size.

here is my code in JavaScript:

var tag= '<object data="'svgfilename'" width="100%" height="100%">';

This code works fine. But i am getting image with scrollbars. I would like to get whole image according to window size.

Thanks in advance
Darma

Answers (5)