css-transforms

Why is text getting blurry and wobbles during 2d scale transform

為{幸葍}努か 提交于 2019-11-30 05:58:24
问题 I want to make this card to scale on hover (including the elements inside it) but the text wobbles/jitters during the transformation (when you hover the card) and gets blurry during and after it's scaled (sometimes, with some ratios more than others, which I think is due to sub-pixel value rounding). How do you remove that wobbling and blurriness during the transformation? I don't care about IE browsers, I only want it to work in the latest Chrome. It seems that it's caused by the transition

Rotate and translate

牧云@^-^@ 提交于 2019-11-30 04:08:52
I'm having some problems rotating and positioning a line of text. Now it's just position that works. The rotation also works, but only if i disable the positioning. CSS: #rotatedtext { transform-origin: left; transform: rotate(90deg); transform: translate(50%, 50%); } The html is just plain text. The reason is because you are using the transform property twice. Due to CSS rules with the cascade, the last declaration wins if they have the same specificity. As both transform declarations are in the same rule set, this is the case. What it is doing is this: rotate the text 90 degrees. Ok.

CSS3 Transform causing text to flicker in Safari and Firefox Mac Yosemite

时光怂恿深爱的人放手 提交于 2019-11-30 03:59:42
I'm having this weird issue on Safari and Firefox (Mac/Yosemite) that causes almost all of the text on the page to flicker when hovering over the transforming element. Example gif: (Firefox, Yosemite) .usp { //USP has an icon that is defined below opacity: .4; @include transition(all .3s ease-in-out); &:hover { opacity: 1; @include transition(all .3s ease-in-out); .icon { @include transform(scale(1.1)); @include transition(all 1.7s ease-in-out); } } // :hover } .usp .icon { display: block; height: 75px; width: 75px; // Insert background-image sprite (removed from this example) @include

CSS Transforms - Why does a simple rotation make the image blurry?

a 夏天 提交于 2019-11-30 03:40:49
问题 Why does a simple rotate make an image blurry? Looking to rotate an image 90deg, but the resulting image is unacceptably blurry. transform: rotate(90deg); This is the same in both Firefox and Chrome (haven't checked other browsers). Here is a JSFiddle link: http://jsfiddle.net/6d2GT/1/ Are there any workarounds/tricks to minimize the blurring? -- In case it's computer specific, an image link http://i.imgur.com/WzXkRL9.png 回答1: You could use the following : #pic { -webkit-transform: rotate

Can css3 translateZ() be used instead of z-index?

好久不见. 提交于 2019-11-30 01:04:27
问题 For example having 2 div's positioned absolute, one can put first div upon second by setting first div's z-index higher than second one's. Can we achieve such behaviour using translateZ() or translate3d? 回答1: The answer now, 3 years after, is that you can. You need to use transform-style: preserve-3d; on the parent, but it's possible. .container { transform-style: preserve-3d; } .test1 { width: 500px; height: 500px; background: red; transform: translate3d(0, 0, 1px); } .test2 { width: 500px;

Scale/zoom a DOM element and the space it occupies using CSS3 transform scale()

霸气de小男生 提交于 2019-11-29 22:52:27
In the middle of my page I have a div element with some content in it (other divs, images, whatever). <div> before </div> <div id="content-to-scale"> <div>something inside</div> <div>another something</div> </div> <div> after </div> I would like to scale that element (content-to-scale) and all it's children. Seems like a job for CSS3 transform's scale operation. However, the problem is that this is a transform on the visualization of that element hierarchy only, it doesn't change the amount of space (or position) of the element on the page. In other words, scaling that element larger will

Weird behavior when rotating an element on hover

房东的猫 提交于 2019-11-29 18:47:03
Given these two examples. Using Hover div { position: absolute; width: 150px; height: 40px; background: orange; left: 50%; top: var(--top); transition: transform 2s; transform: translateX(-50%); text-align: center; line-height: 40px; font-size: 1.2em; } div:hover { transform: translateX(-50%) rotate(var(--deg)); } div:nth-child(1) { --deg: 180deg; --top: 20%; } div:nth-child(2) { --deg: -180deg; --top: 40%; } div:nth-child(3) { --deg: 360deg; --top: 60%; } <div>180deg</div> <div>-180deg</div> <div>360deg</div> Using Animation div { position: absolute; width: 150px; height: 40px; background:

CSS3 transform difference in Firefox and Chrome and IE

纵饮孤独 提交于 2019-11-29 17:34:13
I think it may have something to do with a pseudo element, but I'm not sure. I am having difficulties with the effect of a transform transition using css3. In Firefox v24, the effect works as I want it to - see the CodePen here http://codepen.io/patrickwc/pen/aKEec but in Chrome and IE, the border effect of the links animate and then suddenly switch back into position. It is difficult to describe so the best way is to look at the effect in Firefox then in Chrome or IE. body { background: #000; color: #fff; } p { text-align: center; } nav.footer-social-links a { position: relative; margin: 0

Change text color black to white on overlap of bg

落花浮王杯 提交于 2019-11-29 17:26:47
问题 I have a div that is positioned absolute with a background color gradient. I have this text on it that I want to change to the color white as I scroll the text up. I'm using the 'mix-blend-mode' property to achieve this currently but I can't find any setting that will turn the text from black to white. Has anyone done this before or can think of a trick I can do? .bg-container { position: fixed; top: -30px; left: 0; width: 100px; height: 100px; } .gradient-background { position: absolute; top

CSS rotate and postion on left top Corner

流过昼夜 提交于 2019-11-29 16:28:11
I rotated a div with Text & wanted to Place it on the left top. I managed to place it at the top, but I can't get it working to align with the left edge. How do I do this? .credit { position: absolute; background-color: pink; transform: rotate(-90deg) translateX(-50%); } <div class="credit"> Picture by Name </div> Change the transform-origin to top left and make the translation -100% body { margin:0; } .credit { transform-origin: top left; position: absolute; background-color: pink; transform: rotate(-90deg) translateX(-100%); } <div class="credit"> Picture by Name </div> 来源: https:/