css-transforms

CSS3 spinner, preloader

爱⌒轻易说出口 提交于 2019-12-01 08:13:08
I would like to build a animated spinner with CSS3. It should behave like this : After the last state it should start again like in the first state. I managed to create circles using the technique explained here : stackoverflow question Now, how can I animate the spinner between the described states? I do not know how to animate the clip-rect property. I also guess that it would behave better with a clip-poly instead (a triangle maybe) but I can't animate that either. CSS3 spinner This CSS preloader uses keyframe animations and transform-rotate CSS3 properties to make the circle and the

Resize div when content is rotated

一个人想着一个人 提交于 2019-12-01 04:17:57
问题 I don't know that my question is much different than the question in the possible duplicate. However, the answer in the possible duplicate does not work (even the jsFiddle provided as the answer does not seem to even rotate the text). The answer on this thread actually solved my problem. I'm trying to get a div to resize when the text inside is rotated 90 degrees. Right now, the div stays the same width even though the text becomes "thinner" by rotating it. I've got something like this: html,

CSS Filters break 3D transforms

好久不见. 提交于 2019-12-01 04:06:25
问题 I was experimenting with CSS transforms when I found that filters flatten the transforms, just like transform-style: flat . var toggleFilter = function() { var div = document.getElementById("cube") if (div.className == "cube") { div.className = "cube filter" } else { div.className = "cube" } } * { transform-style: preserve-3d } div.cube { height: 100px; width: 100px; background: blue; transform: rotateX(45deg) rotateZ(45deg); border: solid 2px black; box-sizing: border-box; } div.face1 {

transform scale works incorrectly for odd pixel widths

我的未来我决定 提交于 2019-12-01 03:50:55
I am trying to scale a div, but keep the inside element at the same position and the same size . To do that, I use transform: scale(value) on wrapper and transform: scale(1/value) on the inside div. The problem is, that the inside div shifts when I change scale. That only happens if width/height of wrapper is odd or not whole. It does not happen for even widths/height of the wrapper. My goal is to have many child elements of wrapper that scale alongside wrapper, but only one that does not. Take a look at this example to see problem in action (hover to scale). Example with no issue , inner

How to create a lollipop shape by stacking divs in a circular manner?

心不动则不痛 提交于 2019-11-30 23:17:30
How to stack divs in a circular manner in which last div should come beneath the first div but above the second last div. Is it possible with the css? any helps would be appreciated. Please find the Codepen . Giving the sample code snippet <div class="frame"> <div class="lolly-pop__wrapper"> <div class="lollypop-top"> <div class="lollypop-top__item"></div> <div class="lollypop-top__item"></div> <div class="lollypop-top__item"></div> <div class="lollypop-top__item"></div> <div class="lollypop-top__item"></div> <div class="lollypop-top__item"></div> <div class="lollypop-top__item"></div> <div

Bootstrap flip card with css3 transform

纵然是瞬间 提交于 2019-11-30 21:56:16
I want to create a bootstrap flip card by using CSS3 transform. I did started from this working and basic example However I wanted to modify it to have a fixed height card and some minor enhancement. In particular I needed to have the card flip when the user click on an icon I have created on the top right corner. I have modified the code as you can see here . The problem is that the card does not flip back to front after having flipped correctly to the back side. Can anybody suggest any solution? NOTE: the problem seems to be with the jquery code. Actually I have $('div.flipControl').on(

Preserve 3d not working on ie11

谁说我不能喝 提交于 2019-11-30 19:48:13
问题 I'm trying to implement a flip on an image but its preserve 3d (or probably backface-visibility) is not working on ie11. This solution didn't work for me: -webkit-transform-style: preserve-3d not working Here is a pen for you to try stuff and also a fiddle: http://codepen.io/vandervals/pen/XbedKY?editors=110 .container { -ms-perspective: 1500px; perspective: 1500px; } .canvas { position: relative; width: 300px; -ms-transform-origin: 50% 50%; transform-origin: 50% 50% 0; transition: transform

How to create a lollipop shape by stacking divs in a circular manner?

喜你入骨 提交于 2019-11-30 17:50:36
问题 How to stack divs in a circular manner in which last div should come beneath the first div but above the second last div. Is it possible with the css? any helps would be appreciated. Please find the Codepen. Giving the sample code snippet <div class="frame"> <div class="lolly-pop__wrapper"> <div class="lollypop-top"> <div class="lollypop-top__item"></div> <div class="lollypop-top__item"></div> <div class="lollypop-top__item"></div> <div class="lollypop-top__item"></div> <div class="lollypop

Is there polyfill for css transform property in IE8

試著忘記壹切 提交于 2019-11-30 13:27:50
问题 I have the following mixin for cross-browser transform: .transform (...) { -webkit-transform: @arguments; /* Chrome, Opera 15+, Safari 3.1+ */ -moz-transform: @arguments; /* Firefox 3.5+ */ -ms-transform: @arguments; /* IE 9 */ -o-transform: @arguments; /* Opera 10.5+ */ transform: @arguments; /* Firefox 16+, IE 10+, Opera */ } .translate(@x:0, @y:0) { .transform(translate(@x, @y)); } And apply it something like the following: #main { .translate(280px, 0); } But it's not wotk in IE8 and Opera

How to create a sphere in css?

心不动则不痛 提交于 2019-11-30 13:23:01
问题 I have trying to create a 3D sphere using just pure css, but I've been unable to generate the shape required. I've seen a cylinder but I can't find any reference to creating an actual sphere . My current code looks like: .red { background-color: red; } .green { background-color: green; } .blue { background-color: blue; } .yellow { background-color: yellow; } .sphere { height: 200px; width: 200px; border-radius: 50%; text-align: center; vertical-align: middle; font-size: 500%; position: