css-transforms

why this keyframe animation form this animation effect

。_饼干妹妹 提交于 2019-12-13 22:20:25
问题 I saw this animation on codepen, and I don't know why it's written this way to have this effect, but I think it's going to have the effect of rotating 360deg clockwise, 360deg counterclockwise, instead of bouncing up and down or left and right I'm particularly puzzled with these Keyframe animation @keyframes move{ from { transform: rotate(360deg) translateX(1.125em) rotate(-360deg); } to { transform: rotate(-360deg) translateX(1.125em) rotate(360deg); } } Results the following https://i.stack

Containers have same undesired width

做~自己de王妃 提交于 2019-12-13 15:50:17
问题 I have two containers that make up a transparent border that has a 45 degree angle in it. For some reason the second container maintains the same width/padding as the first container. I want the second container to maintain its own width/padding. Essentially, 30px of padding horizontally to each container, but not the same size. What am I doing wrong? Here is a fiddle....Click for fiddle .home-img-text { position: absolute; left: 13%; top: 25%; } #home-img-text-container1, #home-img-text

Javascript, css: change transform origin to centerpoint of gesturechange

守給你的承諾、 提交于 2019-12-13 14:22:43
问题 I would like to change the transform origin to the center point of the pinch gesture. This working code (safariDevSample) applies scale and rotation without changing the transform-origin : window.angle = 0; //global to store data for later reset .... var newAngle; window.scale = 1; var newScale; function saveChanges() { window.angle = newAngle; window.scale = newScale; } function getAngleAndScale(e) { // Don't zoom or rotate the whole screen e.preventDefault(); newAngle = window.angle + e

Did CSS break my heart?

寵の児 提交于 2019-12-13 13:26:39
问题 Following this question, I created a JSFiddle, but the output doesn't seem so good: Here is the CSS, taken from the answer there: #heart { position: relative; width: 100px; height: 90px; margin-top: 10px; /* leave some space above */ } #heart:before { position: absolute; content: ""; left: 50px; top: 0; width: 52px; height: 80px; background: red; /* assign a nice red color */ border-radius: 50px 50px 0 0; /* make the top edge round */ } #heart:before { -webkit-transform: rotate(-45deg); /* 45

CSS diagonal section divider with background image

老子叫甜甜 提交于 2019-12-13 08:35:47
问题 I'm trying to create diagonal lines between sections of my page using transforms. It works perfectly with a background colour, see: http://jsfiddle.net/jme11/D9M2L/ but not with a background image: http://jsfiddle.net/D9M2L/224/ Why is this? section.diagonal { background-image: url('image.jpg'); } .diagonal:before { -webkit-transform: rotate(-3deg); transform: rotate(-3deg); -webkit-transform-origin: 3% 0; transform-origin: 3% 0; top: 0; left: -25%; z-index: -1; width: 150%; height: 75%;

CSS Transform not working properly on Firefox

人盡茶涼 提交于 2019-12-13 06:23:15
问题 I have this little animation but it does not behave properly on Firefox and it does not work at all on Explorer. The idea is that when you hover on the gray DIV, the red DIV will animate. On Firefox it runs only once when you reload the page and the cursor is hover on the gray area. If you want to make it work again it'll not animate. On chrome it works fine. Oh, before I forget, the animation basics is from animate.css http://jsfiddle.net/soporo123/8PDnA/5/ The HTML: <div id="box"> <div id=

Webkit box-shadow gitches on top of the other elements

我是研究僧i 提交于 2019-12-13 04:33:45
问题 I have some nav elements positioned with transform: rotate() and box-shadow . When you hover them they 'pop out' a little bit to indicate you can click on them. In Chrome and Safari (indicating this is a webkit issue) when you hover some of the nav items the box shadows go haywire and cover up portions of other random elements. It works fine in Firefox. I made a jsfiddle portraying the issue as simply as I could figure out how to: http://jsfiddle.net/Q39eJ/1/ Hover over and then out of the

Using transform to change shape of div

橙三吉。 提交于 2019-12-12 23:07:00
问题 I'm trying to create a page where the 'background' is made out of two different divs. Currently, they are split by a vertical line and I am trying to change it to be a diagonal line, representing the image below: However it seems I am unable to work it out properly. My HTML file is as follows: <!DOCTYPE html> <html> <head> <title>Studenten Opiniepanel</title> <link rel="stylesheet" type="text/css" href="css/main.css"> </head> <body> <section class="container"> <div class="left-half"> <article

Getting rotate3d values with Javascript / jQuery

徘徊边缘 提交于 2019-12-12 19:17:00
问题 Having an element with the following transformation: style="transform: rotate3d(1, 0, 0, -50deg);" I want to be able to get the value -50 with Javascript/jQuery. I want to get the absolute value, so if it is 370deg, i do not want to get 10, but 370. Using $('#element').css('transform') returns a matrix like this: matrix3d(1, 0, 0, 0, 0, 0.642788, -0.766044, 0, 0, 0.766044, 0.642788, 0, 0, 0, 0, 1) Which can be better represented as: matrix3d( 1, 0, 0, 0, 0, 0.642788, -0.766044, 0, 0, 0.766044

Create quadrilateral with specific degree

China☆狼群 提交于 2019-12-12 16:26:42
问题 How can I create a quadrilateral with css, when I know which degree each corner has. I already tried to recreate a quadrilateral I have with transform and skew. However, this does not work really well. This is what I try to archive. The exact requirements are: A div with this as background in one color. On the image are just construction lines. It should be a solid quadrilateral with these angles. This was my first idea: transform: rotate(-45deg) skew(27.5deg, 62.5deg) transform-origin: top