For a particular case, I have to zoom out on the whole body of a web page.
So I took the time to search the various possible solutions but I'm faced with a compatibility problem with the zoom CSS property that doesn't work on Mozilla. I quickly encountered the scale property but it doesn't offer the same desired result, i. e. the equivalent of a conventional zoom out (CTRL -).
Do you know an equivalent technique that works on the main browsers ?
Thank you in advance for your feedback !
https://caniuse.com/#search=zoom
This will tell you what is compatable for each browsers. Not a solution but this is why it's not working in moz.
Just a little searching comes up with using this
.zoom {
zoom: 2;
-moz-transform: scale(2);
-moz-transform-origin: 0 0;
-o-transform: scale(2);
-o-transform-origin: 0 0;
-webkit-transform: scale(2);
-webkit-transform-origin: 0 0;
transform: scale(2); /* Standard Property */
transform-origin: 0 0; /* Standard Property */
}
That should do what you're after :)
Related
I want to zoom out my website when the screen resolution is on 1366*768
the website looks very zoomed-in when chrome is zoom on 100%
I tried
html {
zoom:80%;
transform: scale(1)
transform-origin: 0 0;
}
but nothing works.
Please any help!
You can try this css code. It works with current versions of Chrome, FF, Safari and IE.
html {
zoom: 0.8;
-moz-transform: scale(0.8);
-moz-transform-origin: 0 0;
}
I do have the following style in FF:
opacity: 1;
transform: translate3d(-95.1115px, -25.2431px, 0px) scale(0.7047);
transform-origin: 140.107px 70.2427px 0px;opacity: 1;
I know that it is not working in IE10/IE11 out of the box.
I already found out, that the scale needs to be multiplied with 10
transform: scale(7.047);
to have the same effect.
But the other transforms, I have no clue how to convert them to IE10/11.
Any Ideas?
I tried to change the size of the paper-checkbox by changing the width and height attributes in my css-file, and by using transform: scale(2,2)
Scale makes it blurry, width and height only changes the clickable area.
How would I achieve this?
I think you found the correct solution already. You can't change the resolution, therefore there's nothing you can do.
For those who don't care about the blur, here's the css:
paper-checkbox
{
/* Double-sized Checkboxes */
-ms-transform: scale(2); /* IE */
-moz-transform: scale(2); /* FF */
-webkit-transform: scale(2); /* Safari and Chrome */
-o-transform: scale(2); /* Opera */
padding: 10px;
}
In polymer 1.0 and paper-checkbox 1.2 it works with this simple style
paper-checkbox {
--paper-checkbox-size: 30px;
}
When I was first trying to use paper-checkbox bower installed version 1.0 for me. And this version had issues. So maybe this might be the case for you as well.
I am trying to move a search box widget on a WordPress page by using translate (since it be put there by default). The code below works on all of the major browsers except Safari both the desktop and mobile versions. The code is below:
input#s {
-ms-transform: translateY (85px);
-webkit-transform: translateY (85px);
-moz-transform: translateY (85px);
-o-transform: translateY (85px);
transform: translateY(85px);
z-index: 1000;
position: relative;
display: inline-block;
}
Thanks for any help.
Is there a reason you have spaces after translateY on all of them but the non-prefixed? That's what I'd venture the issue is.
It's reading the translateY but you have "no value" attached to it due to the spaces.
My Chrome console returns Invalid CSS property name to a transform-origin CCS attribute as the site loads even though it works and I have a -webkit- prefixed version.
The target CSS looks like this:
-webkit-transform-origin: 0% 50%;
-moz-transform-origin: 0% 50%;
transform-origin: 0% 50%;
Is it really an issue?
I've found the origin of my issue.
The problem is that -webkit- browsers don't accept the transform-origin attribute when it is isolated from a supporting attribute (an attribute that actually uses the transform-origin).
So, for example, if I use something like this, -webkit- assumes it is wrong:
#divOne{
transform-origin:50% 50%;
animation:jump 1s ease both;
}
#keyframe jump{
from { transform: translateX(-20%) rotateY(-90deg); }
to{ transform: translateX(0%) rotateY(0deg); }
}
It is wrong because the origin attribute is detached from the transform that is going to take use of it. Even though it works, it is not entirely correct on the browser's perspective.
It should be something like this to be correct:
#divOne{
animation:jump 1s ease both;
}
#keyframe jump{
from { transform: translateX(-20%) rotateY(-90deg); transform-origin:50% 50%; }
to{ transform: translateX(0%) rotateY(0deg); transform-origin:50% 50%; }
}
Where both transforms are together on the same element.
The answer to your question in simple terms is 'NO'. It is a perfectly valid property. There must be something else that's causing the error.
Read this:
https://docs.google.com/document/d/1UsKm0ywILw9cuTRYlkhqMYTdzNcih6sO15u1eCzGgP8/edit?pli=1#
and this
https://developer.mozilla.org/en-US/docs/Web/CSS/transform-origin#Browser_compatibility