前端 - transform:rotate不能旋转的问题
问题描述
这个是我要的效果,箭头代码如下
.page4 .arrow-up{
position: absolute;width: 80/100rem;height: auto;margin-left: 50%;left:-40/100rem;bottom: 5%;animation: moveIconUp ease 2s both infinite;-webkit-animation: moveIconUp ease 2s both infinite;transform:rotate(180deg);-webkit-transform:rotate(180deg);
}
@-webkit-keyframes moveIconUp {
0% { -webkit-transform: translateY(120%); opacity: 0;}50% { -webkit-transform: translateY(0%); opacity: 1;}100% { -webkit-transform: translateY(-160%); opacity: 0;}
}
出来的效果是
箭头ui切出来是向下的,我是想用transform:rotate(180deg)把他转过来,不知道那里错了
问题解答
回答1:你的动画moveIconUp 里面设置了transform把它覆盖掉了。transform多个属性用空格隔开,不然后面写的会把前面的覆盖,这样写:transform:translateY(-160%) rotate(180deg)
回答2:transform里的各个属性不能单独设置
回答3:设置成块状元素
相关文章:
1. 致命错误: Class ’appfacadeTest’ not found2. javascript - vue-cli怎么根据后端接口服务器不同 build不同接口代码?3. python - 关于爬虫爬取图片的问题?4. PHP中文网定制款鼠标垫5. python - 如何使用jsom.dumps获得完整的json数据?6. css - width设置为100%之后列表无法居中7. python2.7 - 在Eclipse开发Python,怎么去掉控制台输出的其他消息??8. javascript - 一个前端的自我修养9. javascript - [多图预警]reactjs点击某表格编辑内容,跳转传值this.context.router.params.id时id报错未定义10. mysql 一个sql 返回多个总数
