我想添加從底部到頂部的填充動畫.box-inner-1
但CSS旋轉不能正常工作!HTML - CSS旋轉Div 180度不旋轉
$('.box-inner-1').css({
top: '0'
}).animate({
"height": 260
}, 4000);
.wrapper {
position: relative;
height: 260px;
width: 260px;
padding: 0px !important;
background: #ddd;
}
.box-inner-1 {
position: absolute;
height: 0px;
left: 0;
right: 0;
background-color: greenyellow;
-ms-transform: rotate(-180deg);
-webkit-transform: rotate(-180deg);
transform: rotate(-180deg);
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="wrapper">
<div class="box-inner-1"></div>
</div>
添加'邊框頂部(?):1px的固體# f00'到您的'.box-inner-1'。旋轉正在工作。 – Jonathan