I have a MVC 5 app, and I need to have a default zoom out. I don't want to use JavaScript or CSS.
Does such a way exist to change zoom level across all browsers?
3 Answers
Answers 1
<html> <body> <div id="sampleDiv" style="width: 100px; background-color: Gray;"> Zoom Me </div> <button onclick="sampleDiv.style.zoom='300%'">Zoom 300%</button> <button onclick="sampleDiv.style.zoom='200%'">Zoom 200%</button> <button onclick="sampleDiv.style.zoom='100%'">Zoom 100%</button> </body> </html>
Answers 2
Are you looking for initial-scale
attribute of the viewport
meta
tag? Note that this is not a part of a standard yet but is already supported reasonably well on mobile device.
Answers 3
I wonder had not you try this by setting body zoom atribute:
private void webBrowser_getDocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { webBrowser1.Document.Body.Style = "zoom:300%;"; }
0 comments:
Post a Comment