【问题标题】:What kind of graphics is this? [closed]这是什么图形? [关闭]
【发布时间】:2012-05-05 22:35:27
【问题描述】:

http://googleblog.blogspot.in/

当您将鼠标移到球上时,球会反弹。谁能告诉我这是怎么做到的..

【问题讨论】:

  • 他用 javascript 做到了这一点 :)
  • 使用“原力”——阅读源代码!
  • @sandeep 我以为是 C++。 :P
  • @Filburt 我无法从源头得到任何想法。

标签: html animation css


【解决方案1】:

每个球都是这样制作的 div:

<div style="position: absolute; z-index: -1; border-top-left-radius: 400px; border-top-right-radius: 400px; border-bottom-right-radius: 400px; border-bottom-left-radius: 400px; background-color: rgb(68, 134, 197); -webkit-transform: translate(0.13934886012209222px, 15.280991621327088px); width: 40.078411732250885px; height: 40.078411732250885px; "></div>

圆形感谢-webkit-transform:matrix();

移动是使用纯 JavaScript 进行的,捕获鼠标按钮和数学公式。

【讨论】:

  • 你检查过背景图片吗..每个都不是div..
  • 是的,they are
  • 其实矩阵是用来做变换的(这里可能是用来翻译的)。圆形是由边界半径制成的。
【解决方案2】:

它是带有圆角 div 和一些 CSS3 技巧的纯 CSS

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-01-21
    • 2018-03-30
    • 1970-01-01
    • 1970-01-01
    • 2016-04-12
    • 2014-11-17
    • 2021-01-31
    • 2022-01-05
    相关资源
    最近更新 更多