javascript - css3 变换透视和倾斜失败

标签 javascript css

#box{
  width:200px;
  height:100px;
  background:blue;
    transform: perspective( 150px ) rotateY( 45deg );
  position:absolute;
  top:150px;
  left:140px;
}
<img src="http://i.imgur.com/A4VH0LQ.jpg">

<div id="box"></div>

尝试制作一个盒子并将其映射到广告牌中但失败了。无法正确掌握旋转和透视。

最佳答案

我不确定你在问什么,因此不应该尝试回答,但我想为什么不呢?所以试试这个:

#box{
  width:200px;
  height:100px;
  background:blue;
  transform: perspective( 150px ), rotateY( 45deg );
  position:absolute;
  top:150px;
  left:140px;
}

您的代码片段在 perspective 和 rotateY 转换属性之间缺少一个逗号。

关于javascript - css3 变换透视和倾斜失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38508398/

相关文章:

javascript - 使用 Dynamics 为选项卡着色

javascript - 通过向下和向上滚动更改 css

jquery - 单击时如何将div下拉值放入文本框

twitter-bootstrap - 如何修复列中的 Bootstrap 4 内容响应?

css - 使用 CSS3 媒体查询在 Samrty 中包含一个文件

javascript - 动画 css 效果 - JQuery

javascript - 如何向 angularjs 中的对象数组添加属性

javascript - CSV 数据和 JS/HTML

c# - 根据不同的元素id设置工具提示

css - WP7 :before and :after