详细问题描述
[内容]我是初学者,用伪类content+ :hover做了一个小动画。但是transform在HBuilder内置浏览器内全部无效,不论是translate/ rotate/ scale.... 均无效,但是导出到其他外置浏览器 chrome/ firefox...均正常,且许多在线编辑器网站也正常生效。
[代码片段]
# CSS:
.div1 {
/*float: left;*/
width: 100px;
height: 100px;
border-radius: 100px;
box-sizing: border-box;
transition: all 1s .5s;
border: 5px solid blue;
}
.div2 {
background-color: green;
/*float: left;*/
width: 0px;
height: 100px;
transition: all 1s;
opacity: 0;
}
.div3 {
/*float: left;*/
width: 0;
height: 0;
border-top: 50px solid transparent;
border-right: 50px solid transparent;
border-bottom: 50px solid transparent;
border-left: 0px solid yellowgreen;
opacity: 0;
transition: all 1s;
}
.div1:hover {
border: 50px solid blue;
border-radius: 100px 0 0 100px;
transition: all .5s;
}
.div1:hover~.div2 {
width: 200px;
opacity: 1;
transition: all 1s .3s;
}
.div1:hover~.div3 {
border-left: 50px solid orange;
opacity: 1;
transition: all 1s .6s;
}
.container {
display: flex;
justify-content: left;
transform: translate(50px, 100px)rotate(30deg);
transform-origin: 5% 5%
/*border: 3px solid red;*/
}
# HTML:
<div class="container">
<div class="div1"></div>
<div class="div2"></div>
<div class="div3"></div>
</div>
2 个回复
大猴子会跳舞 (作者)
transform所有属性都不起作用在小米平板上
n***@163.com
详细问题描述
[内容]我是初学者,用伪类content+ :hover做了一个小动画。但是transform在HBuilder内置浏览器内全部无效,不论是translate/ rotate/ scale.... 均无效,但是导出到其他外置浏览器 chrome/ firefox...均正常,且许多在线编辑器网站也正常生效。
[代码片段]