如何解决Ion-slide 有一个内置的 transform:translate3d 属性,我该如何删除它?
我正在接管一个带有幻灯片的离子项目,我不明白我是如何取消内置的 translate3d 的。 我需要移除它才能做一个位置:固定在幻灯片中的一个按钮上。 我尝试通过 javascript 获取 swiper-wrapper 类并在其上放置一个 translate3d(0,0),但它并没有解决问题。 以下是有关幻灯片的文档:https://ionicframework.com/docs/api/slides
div 的 html:
<div class="fixeddiv" *ngIf="positionActive <= i+1 && indice.type == 'itinerary'">
<button [disabled]="(distance > 10 && userLat && userLng) ? true : false" class="fixedbutton btn quizz__submit" (click)="validationItinerary(i)">
{{ 'hunt-detail.quizz.place.btn' | translate }}
</button>
</div>
CSS:
.fixeddiv{
position:fixed;
background-color: white;
border-radius: 30 30 0px 0px;
Box-shadow: 60 -10px 0px 20px rgba(37,32,0.12);
padding: 30px 30px 43px 30px;
bottom:0px;
left:0px;
width:100%;
}
修复 translate3d 的 Javascript:
const temp = Array.from(document.getElementsByClassName('swiper-wrapper') as HTMLCollectionOf<HTMLElement>)
temp.forEach(element=>{
element.style.transform='translate3d(0,0)'
})
```
So far I'm working with a solid 320px as it is the width of my testing screen,the current translate3d is (-320px,0)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。