css-transforms

Make CSS3 triangle with linear gradient

流过昼夜 提交于 2019-11-26 17:09:02
问题 I need to create button with triangle on one side (like this http://css-tricks.com/triangle-breadcrumbs/ ) with linear vertical gradient and border, and I want to use pure CSS3. It's ok if I need 45deg "triangle", I just write smth like this .button:after { -webkit-transform: rotate(45deg); background: -webkit-linear-gradient(-45deg, #fff, #000); content: ''; width: 2em; height: 2em; display: block; } and hide half of that pseudo-element under .button (so only another half of it is visible,

Why does my Transform snap back?

做~自己de王妃 提交于 2019-11-26 16:47:32
Am trying to make my element stay in spot (after the transition). Right now, the translated location is where I want it but then my name snaps back onto the quote. Am I missing a piece of code or is there a piece of code that's making this snap back happen? .blockquote { font-family: "Open Sans", Verdana, Arial, sans-serif; font-size: 30px; line-height: 60px; width: 100%; background-color: rgba(0, 0, 0, 0.16); /*rgba(192, 241, 247, 0.15);*/ height: 100px; text-align: center; padding-top: 40px; color: white; font-weight: 300; font-style: italic; transition: all 250ms ease-in-out; } .blockquote

webkit transform blocking link

旧街凉风 提交于 2019-11-26 16:28:34
问题 I've been working with transforms and transitions to create animated UI components without Javascript and really enjoying the results, but I've come across a disturbing issue that appears to be unique to webkit browsers. On an element which I have rotated, an anchor that spans 100% of the width of the element is only accessible on the right 50% of the element. This problem does not exist using -moz-transform in Firefox, but is 100% reproducible in both Chrome and Safari using -webkit

Backface-Visibility Not Working Properly in Firefox (Works in Safari)

社会主义新天地 提交于 2019-11-26 14:43:39
问题 I'm having a problem with the back face-visibilty property. It works how I want it to in Safari/Chrome, but for some reason it's not working correctly in Firefox. When the box flips, I get a mirror image of the front face. 回答1: This bug has been acknowledged by Mozilla. The fix is to add transform: rotateX(0deg) to the front and back objects. Adding backface-visiblity:hidden on the container, as suggested by @yalia, makes the back unresponsive in Chrome, hence that fix should be avoided. Here

How can I use CSS3 transform on a span?

戏子无情 提交于 2019-11-26 14:40:45
问题 I have a inline element (a <span> ) nested in a <h1> tag. I applied a transform property to the h1 ( skew so it looks like a parallelogram). I need to transform the span tag to "unskew" it and its text. But this only seems to work in IE. Here is an example of the HTML and CSS: h1 { background: #f00; padding: .25em .5em; text-align: right; transform: skew(-15deg); } h1 span { color: #fff; transform: skew(15deg); } <h1><span>This is a Title</span></h1> 回答1: Explanation: A <span> is an inline

Combination of animation and transition not working properly

隐身守侯 提交于 2019-11-26 12:47:29
问题 I have been trying to put some basic CSS3 animation. The objective is to toggle a class on the click event of a button and animate a div based on the added class. The code works perfectly for the first iteration of toggle in Firefox but for other browsers like Chrome and for the next iteration in Firefox the transformation is toggled in a blink of an eye. Please help me to figure out what\'s going wrong. Snippet: $(\'button\').click(function() { $(\'div\').toggleClass(\'clicked\'); }); div {

Hover effect : expand bottom border

懵懂的女人 提交于 2019-11-26 12:04:06
I'm trying to get a transition hover effect on border that the border expands on hover. h1 { color: #666; } h1:after { position: absolute; left: 10px; content: ''; height: 40px; width: 275px; border-bottom: solid 3px #019fb6; transition: left 250ms ease-in-out, right 250ms ease-in-out; opacity: 0; } h1:hover:after { opacity: 1; } <h1>CSS IS AWESOME</h1> I've tried this on Jsfiddle To expand the bottom border on hover , you can use transform:scaleX'(); ( mdn reference ) and transition it from 0 to 1 on the hover state. Here is an example of what the border hover effect can look like : The

How to keep origin in center of image in scale animation?

≯℡__Kan透↙ 提交于 2019-11-26 11:56:16
I have a situation similar to this fiddle , where I have a CSS3 animation that scales an element absolute-positioned in the centre of another element. However, when the animation takes place it is off-centre, as seen by the red squares relative to blue in the example. How do I centre it? I have tried a couple of configurations around the transform-origin property, but this isn't producing the correct results. Code below: @-webkit-keyframes ripple_large { 0% {-webkit-transform:scale(1);} 75% {-webkit-transform:scale(3); opacity:0.4;} 100% {-webkit-transform:scale(4); opacity:0;} } @keyframes

Html/Css Triangle with pseudo elements

时间秒杀一切 提交于 2019-11-26 10:57:00
I am trying to create a triangle shape with the pseudo elements. like the one in the image below. But this is what i get. Here is what i have tried this far. .container .form--container:before { content: ""; position: absolute; top: 0px; left: 130px; width: 28px; height: 28px; transform: translate(-1rem, -100%); border-left: 1.5rem solid #979797; border-right: 1.5rem solid #979797; border-bottom: 1.5rem solid white; } The issue is with the use of border. you can check this link How do CSS triangles work? and you will understand how border works and why you get this output. An alternative

5 images symmetrically seperated with diagonal lines

半城伤御伤魂 提交于 2019-11-26 10:05:00
问题 I browsing around the internet and I stumbled upon this theme on reddit After seeing this lovely banner. I wanted to try and emulate something like this using five symmetric images of my choice that is separated by diagonal lines just like the picture above. Maybe additionally try and put in some text on top of the assorted images. Something like this: I tried re-writing something similarly online in css using cats picture .image-container { width: 90%; height: 200px; position: relative;