Last active
December 14, 2015 19:49
-
-
Save elmimmo/5139053 to your computer and use it in GitHub Desktop.
Display an image full-screen, proportionally, in HTML using SVG
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta charset="UTF-8"/> | |
<title> </title> | |
<style type="text/css"> | |
html, body { | |
height: 100%; | |
width: 100%; | |
margin: 0; | |
padding: 0; | |
} | |
</style> | |
</head> | |
<body> | |
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" | |
preserveAspectRatio="xMidYMid meet" | |
width="100%" | |
height="100%" | |
viewBox="0 0 1021 1566"> | |
<g id="page"> | |
<image overflow="visible" width="1021" height="1566" xlink:href="cover.jpg"/> | |
</g> | |
</svg> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment