加载中…
  
博文
标签:

杂谈

分类: 前端开发
transform(变形)和transform-origin(变形原点)的说明:

      目前这两个属性得到了除去ie以外各个主流浏览器webkit,firefox,opera的支持,属性名分别为

      -webkit-transform,-moz-transform,-o-transform;

1、改变元素基点transform-origin

  • transform-origin是变形原点,也就是该元素围绕着那个点变形或旋转,该属性只有在设置了transform属性的时候起作用;
  •  因为我们元素默认基点就是其中心位置换句话说我们没有使用transform-origin改变元素基点位置的情况下,transform进行的rotate,translate,scale,skew,matrix等操作都是以元素自己中心位置进行变化的
  • 但有时候我们需要在不同的位置对元素进行这些操作,那么我们就可以使用transform-origin来对元素进行基点位置改变,使元素基点不在是中心位置,以达到你需要的基点位置。
  • 下面我们主要来看看其使用规则:

    transform-origin(X,Y):用来设置元素的运动的基

标签:

杂谈

分类: 前端开发

Javascript刷新页面的几种方法:
   history.go(0)
   window.location.reload()

     window.location.reload(true) 
   location=location
   location.assign(location)
   document.execCommand(''Refresh'')
   window.navigate(location)
   location.replace(location)
   document.URL=location.href

 

Frame框架:

frame.html:

<frameset rows='50%,50%'>
       <frame name=top src='top.html'>
       <frame name=bottom src='bottom.html'>
    </frameset>

七种语句:

语句1. window.parent.frames[1].location.reload();
    语句2. w

  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有