transform

Multiple Transforms on mousemove jquery

笑着哭i 提交于 2020-01-13 20:42:06
问题 Probably an easy fix, but for the life of me I can't figure it out or may be overthinking it. In short I have a div that rotatesY based on mousemove. I have that working, but I also need it to translate across the X axis as well. So I know I have to use transform: translateX(value), but not sure how to apply two transforms the best way in jquery. Thanks for the help. Fiddle link below. Also is there a way to change the rotationY directions? var $window = $(window), $box = $('#box') rotation =

Is there a transformation matrix that can scale the x and/or y axis logarithmically?

狂风中的少年 提交于 2020-01-13 10:03:03
问题 I'm using .net WPF geometry classes to graph waveforms. I've been using the matrix transformations to convert from the screen coordinate space to my coordinate space for the waveform. Everything works great and it's really simple to keep track of my window and scaling, etc. I can even use the inverse transform to calculate the mouse position in terms of the coordinate space. I use the built in Scaling and Translation classes and then a custom matrix to do the y-axis flipping (there's not a

Is there a transformation matrix that can scale the x and/or y axis logarithmically?

大城市里の小女人 提交于 2020-01-13 10:02:18
问题 I'm using .net WPF geometry classes to graph waveforms. I've been using the matrix transformations to convert from the screen coordinate space to my coordinate space for the waveform. Everything works great and it's really simple to keep track of my window and scaling, etc. I can even use the inverse transform to calculate the mouse position in terms of the coordinate space. I use the built in Scaling and Translation classes and then a custom matrix to do the y-axis flipping (there's not a

Chrome 69 when using 'transform', '-webkit-background-clip: text' and 'color:transparent' don't work

大兔子大兔子 提交于 2020-01-13 09:05:53
问题 CSS code : .test { -webkit-background-clip: text; color: transparent; background-image: linear-gradient(to right, #e74c3c 20%, #f4d03f 40%, #2ecc71 60%, #5dade2 80%, #a569bd 100%); display: inline-block; } <span class="test">abcde</span> but with 'transform', .test { -webkit-background-clip: text; color: transparent; background-image: linear-gradient(to right, #e74c3c 20%, #f4d03f 40%, #2ecc71 60%, #5dade2 80%, #a569bd 100%); transform-origin: 0; transform: scale(1.2); /*any attributes*/

移动Web利器transformjs入门

折月煮酒 提交于 2020-01-13 06:27:49
简介 在过去的两年,越来越多的同事、朋友和其他不认识的童鞋进行移动web开发的时候,都使用了 transformjs ,所有必要介绍一下,让更多的人受益,提高编程效率,并享受编程乐趣。(当然transformjs不仅仅支持移动设备, 支持CSS3 3D Transforms的浏览器 都能正常使用transformjs) 传送门 官方网站: http://alloyteam.github.io/AlloyTouch/transformjs/ Github地址: https://github.com/AlloyTeam/AlloyTouch/tree/master/transformjs 安装 npm install css3transform API Transform(domElement, [notPerspective]); 通过上面一行代码的调用,就可以设置或者读取 domElement的"translateX", "translateY", "translateZ", "scaleX", "scaleY", "scaleZ", "rotateX", "rotateY", "rotateZ", "skewX", "skewY", "originX", "originY", "originZ"! 方便吧! 使用姿势 Transform(domElement);//or

前端学习(391):新春贺卡制作13视口控制

别等时光非礼了梦想. 提交于 2020-01-12 20:25:07
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0,minimum-scale=1, maximum-scale=1,user-scalable=no"> <meta name="format-detection" content="telephone=no"> <meta http-equiv="X-UA-Compatible" content="chrome=1"> <title>新春贺卡</title> <link rel="stylesheet" type="text/css" href="./mooccss/style.css"> </head> <body> <div class="music"> <img src="./moocimg/music_pointer.png" alt=""> <img class="play" id="music" src="./moocimg/music_disc.png" alt=""> </div> <div class="page" id="page1"> <div class="bg"></div> <div class

CSS3 3D转换效果

无人久伴 提交于 2020-01-12 11:40:40
CSS3 3D 转换 三维变换使用基于二维变换的相同属性,如果您熟悉二维变换,你们发现3D变形的功能和2D变换的功能相当类似。CSS3中的3D变换主要包括以下几种功能函数: 3D位移:CSS3中的3D位移主要包括translateZ()和translate3d()两个功能函数; 3D旋转:CSS3中的3D旋转主要包括rotateX()、rotateY()、rotateZ()和rotate3d()四个功能函数; 3D缩放:CSS3中的3D缩放主要包括scaleZ()和scale3d()两个功能函数; 3D矩阵:CSS3中3D变形中和2D变形一样也有一个3D矩阵功能函数matrix3d()。 1.3D位移 在CSS3中3D位移主要包括两种函数translateZ()和translate3d()。translate3d()函数使一个元素在三维空间移动。这种变形的特点是,使用三维向量的坐标定义元素在每个方向移动多少。 随着px的增加,直观效果上: X:从左向右移动 Y:从上向下移动 Z:以方框中心为原点,变大 从上图的效果可以看出,当z轴值越大时,元素也离观看者更近,从视觉上元素就变得更大;反之其值越小时,元素也离观看者更远,从视觉上元素就变得更小。 例子: height: 300px; float: left; margin: 15px; position: relative;

CSS3 transform property working differently in Internet Explorer

非 Y 不嫁゛ 提交于 2020-01-12 06:32:46
问题 I am using the following CSS to centre a div in the middle of my page: .someWrapper { width: 100%; height: 100%; position: relative; } .centredDiv { width: (some width); height: (some height) position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); -moz-transform: translate(-50%, -50%); -ms-transform: translate(-50%, -50%); -o-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } I have tested this in Chrome, Firefox and Safari and it works as

CSS3(3)---2D变形(transform)

寵の児 提交于 2020-01-12 01:42:43
原文: CSS3(3)---2D变形(transform) CSS3(3)---2D变形(transform) 2D变形是CSS3中具有颠覆性的特征之一,它常用的属性有: 移动 (translate)、 缩放 (scale)、 旋转 (rotate)、 倾斜 (skew)。 一、2D变形语法 1、移动 (translate) 移动的属性: translate translate(x,y)水平方向和垂直方向同时移动(也就是X轴和Y轴同时移动) translateX(x)仅水平方向移动(X轴移动) translateY(Y)仅垂直方向移动(Y轴移动) 比如设置为: transform: translate(50px,60px); /* 水平向右移动50px 和 垂直向下移动60px*/ 运行结果 说明 从上面运行结果可以看出两点 1、移动的原点默认是 最左角上 的位置。 2、px取正数代表 向右 或者 向下。Px为负值,那就变成向左 或者 向上。 2、缩放 (scale) 缩放的属性: scale scale(X,Y)使元素水平方向和垂直方向同时缩放(也就是X轴和Y轴同时缩放) scaleX(x)元素仅水平方向缩放(X轴缩放) scaleY(y)元素仅垂直方向缩放(Y轴缩放) 说明 scale默认值为1,设置0.5代表缩小一倍,2代表放大一倍。 比如设置为: transform:

How can I apply an SVGMatrix to an array of points?

纵饮孤独 提交于 2020-01-11 13:25:15
问题 Are there built-in libraries to multiply a vector of points by an SVGMatrix? I have an SVG drawing that has been scaled, and I want to annotate that drawing in its original coordinate system with a line that has a fixed width in screen space. (I.e. the line should not change width when zooming in or out, but lines in the image do, of course.) So, my approach is to transform the image inside a , and then take my array of points and apply the same transformation, then create a new path object