I want to detect where a MouseEvent has
occurred, in coordinates relative to the clicked element. Why? Because I want to add an absolutely positioned child element
at the clicked location.
I kn...
分类:
Web程序 时间:
2014-08-05 11:09:29
阅读次数:
293
利用css3实现一个半月形的西瓜,利用queue实现吃西瓜的动画。练习例子css3:1、圆角border-radius:100%;border-top-left-radius:5px;2、变形2D旋转:transform: rotate(25deg);(正角度为顺时针,负角度为逆时针)。3D旋转:t...
分类:
Web程序 时间:
2014-08-04 20:36:27
阅读次数:
251
利用css3实现一个半月形的西瓜,利用queue实现吃西瓜的动画。练习例子css3:1、圆角border-radius:100%;border-top-left-radius:5px;2、变形2D旋转:transform: rotate(25deg);(正角度为顺时针,负角度为逆时针)。3D旋转:t...
分类:
Web程序 时间:
2014-08-04 13:55:47
阅读次数:
388
Transform.Rotate 旋转应用一个欧拉角的旋转角度,eulerAngles.z度围绕z轴,eulerAngles.x度围绕x轴,eulerAngles.y度围绕y轴(这样的顺序)。如果相对于留空或者设置为Space.Self 旋转角度被应用围绕变换的自身轴。(当在场景视图选择物体时,x、...
分类:
其他好文 时间:
2014-08-03 12:39:35
阅读次数:
713
在做rpg类游戏的过程中,经常遇到要判断周围怪物相对自身的方位
1.判断目标在自己的前后方位可以使用下面的方法:
Vector3.Dot(transform.forward, target.position)
返回值为正时,目标在自己的前方,反之在自己的后方
2.判断目标在机子的左右方位可以使用下面的方法:
Vector3.Cross(tra...
分类:
其他好文 时间:
2014-08-01 16:10:11
阅读次数:
224
一、UIView常见属性1.frame 位置和尺寸(以父控件的左上角为原点(0,0))2.center 中点(以父控件的左上角为原点(0,0))3.bounds 位置和尺寸(以自己的左上角为原点(0,0))4.transform 形变属性(缩放、旋转)5.backgroundColor 背景颜色6....
分类:
移动开发 时间:
2014-07-31 20:31:37
阅读次数:
272
很早以前了解过当元素是固定宽度和高度的时候,水平垂直高居中的方法可以设置margin的负值来使其居中,这个负值是元素的宽和高的一半,比如宽高是100px,那么就用margin-left:-50px;margin-top:-50px这样的写法。但如果这个元素的宽高是用百分比表示呢?如果使用百分比来设置...
分类:
Web程序 时间:
2014-07-31 16:17:36
阅读次数:
227
ie使用filter滤镜 仅限于rotate假设对应 css3 rotate(30deg),那么只要将以下矩阵值赋给 matrix filter 对应元素并设置 SizingMethod='auto expand' 即可:rad=30*Math.PI/180;[ cos rad, -sin rad....
分类:
其他好文 时间:
2014-07-30 20:36:24
阅读次数:
276
今天看到一个国外的网站有这么个效果,很好奇如何实现的,研究了一番,将效果实现了,很酷,不用任何图片
http://abemedia.co.uk/content-management-systems-cms
@-webkit-keyframes rotate1 {
from { -webkit-transform: rotate(0deg); }
...
分类:
其他好文 时间:
2014-07-29 18:10:52
阅读次数:
247
CSS3 transform都有哪些常用属性?transform的属性包括:rotate() / skew() / scale() / translate(,) ,分别还有x、y之分,比如:rotatex() 和 rotatey() ,以此类推。下面我们来分解各个属性的用法:transform:ro...
分类:
Web程序 时间:
2014-07-29 14:13:48
阅读次数:
323