Someone did post a solution to scale page some months ago.Sorry my bad found it!
However i seem to lost the working code.
Please repost?
<style>
:root{
transform-origin:0 0;
transform: scale(var --test));
}
</style>
//This is to set scale depending on resolution.
<script>
// Get the root element
var scaleData = document.querySelector(':root');
alert(scaleData);
// Create a function for getting a variable value
function getScale() {
// Get the styles (properties and values) for the root
var screenScale = getComputedStyle(scaleData);
alert(screenScale);
// Alert the value of the --blue variable alert(scaleData.getPropertyValue('--test'));
}
// Create a function for setting a variable value
function setScale() {
r.style.setProperty('--test', '4');
}
getScale();
setScale();
</script>
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 250 |
Nodes: | 16 (2 / 14) |
Uptime: | 90:22:11 |
Calls: | 5,510 |
Calls today: | 5 |
Files: | 11,668 |
Messages: | 5,087,301 |