css-transforms

CSS transform doesn't work in Mozilla browser

家住魔仙堡 提交于 2021-01-28 11:24:11
问题 I am trying to create a 3D animated slider using a combination of input/label to trigger the transition on click but it doesn't work in Mozilla firefox. It works perfectly fine in Chrome but in Mozilla there's no transition between the cards when I click https://codepen.io/panfilov/pen/GogJVy * { margin: 0; padding: 0; } body { padding: 20px; background: #eee; user-select: none; } [type=radio] { display: none; -webkit-perspective:1000px; -moz-perspective:1000px; } #slider { height: 35vw;

Why perspective isn't giving the same result when some styles are updated?

心不动则不痛 提交于 2021-01-27 23:33:18
问题 I have two boxes with 3d transformation (rotationY). Each have almost the same values, one perspective looks fine, the other kinda wrong but still have some correct perspective. The first box at the top side does not protrude, but it have a perspective view yet. Also the 3° the container is 200% bigger The second box do a beautiful 3d effect. Here I made the example of what I'm trying to explain. $(".eye").on('click', function () { $( '.man' ).toggleClass('open'); }) * { padding: 0; margin: 0

Keep image original size inside smaller div

房东的猫 提交于 2021-01-27 04:47:14
问题 I have an image that is 600x400px, and want it inside a smaller div of size 240x200px, but the image shrinks or gets distorted. I want the original size image centered in the smaller div, which would hide some of the image I wrote this CSS rule to apply to different image sizes. .theBox { float: left; overflow: hidden; width: 240px; height: 200px; } .theBox img { display: block; height:100% !important; width:100% !important; } 回答1: If you specify a 100% size for your image. Your image will

Text images adapt with CSS transform responsive design within grid (remove zoom)

匆匆过客 提交于 2021-01-07 06:33:23
问题 I have dates that are calculated with PHP and spat out as images that read things like 26th of February, 3rd of March etc. As the dates obviously different in character length I want the images to match a specific font size. The problem I have is making this all fit within a grid that is responsive as the images don't scale with the grid with transform. If I set a max width for the grid at some point the large image catches up with the smaller image, they both become the same width which

Text images adapt with CSS transform responsive design within grid (remove zoom)

梦想与她 提交于 2021-01-07 06:32:37
问题 I have dates that are calculated with PHP and spat out as images that read things like 26th of February, 3rd of March etc. As the dates obviously different in character length I want the images to match a specific font size. The problem I have is making this all fit within a grid that is responsive as the images don't scale with the grid with transform. If I set a max width for the grid at some point the large image catches up with the smaller image, they both become the same width which

Is it possible to use transform: scaleX() without affecting the border-radius?

别说谁变了你拦得住时间么 提交于 2020-12-30 02:30:26
问题 I am trying to generate a simple expanding bar animation. Everything works find and I control it to my liking, except for the changing border-radius which is affected by the scaleX() transformation. Is there a way to avoid this effect? I assumed using an absolute unit for border-radius would suffice but it doesn't. scaleX() still affects it. Important note: I want to use scaleX() rather than working with the width property because the elements i am working on come with various changing widths

CSS transform on SVG text element not working in Safari

我怕爱的太早我们不能终老 提交于 2020-12-12 11:22:05
问题 Trying to position a battery indicator within a parent SVG.The SVG <svg viewBox="0 0 24 24"> element has a path for the battery and a text element showing the percentage.Its being positioned with a couple of css transforms and text attributes.The text is correctly positioned when opening in chrome/firefox but goes offshoot in safari. <text text-anchor="middle" dominant-baseline="middle" style="transform:translate(50%,98%) scale(.2); font:700 13px sans-serif;fill:#deba78" >24.2%</text> Codepen