Don't use translate() to center formspec output.
Firefox seems to have rendering glitches and off-by-one errors when translate() is used.
This commit is contained in:
parent
42f6b30389
commit
843d70dcef
19
index.html
19
index.html
|
@ -5,8 +5,23 @@
|
||||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||||
<script src="https://unpkg.com/fengari-web/dist/fengari-web.js"></script>
|
<script src="https://unpkg.com/fengari-web/dist/fengari-web.js"></script>
|
||||||
<script type="application/lua" src="index.lua"></script>
|
<script type="application/lua" src="index.lua"></script>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
background: #8CBAFA;
|
||||||
|
}
|
||||||
|
#formspec_output {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body style="background: #8CBAFA;">
|
<body>
|
||||||
<div id="formspec_output" style="position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);"></div>
|
<div id="formspec_output"></div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue