我正在尝试设置模态的 top
当我在 #singlePost
模式中设置为顶部时,即使没有触发器也会显示。
我试过 $('#singlePost').css("top", "1%");
但它不起作用
也在github上试过这个
github
有什么解决办法吗?
<div id="singlePost" class="modal" >
<div class="modal-content">
<div class="row">
<div class="col m9 s12">
<img class="input-field" ng-src="img/cover.jpeg" alt="" >
</div>
</div>
</div>
CSS
#singlePost
{
background-color: #f7f8fa;
width:90%;
height:90% !important;
display: table !important;
}
脚本
$('#singlePost').modal('open', {
dismissible: true,
inDuration: 200,
outDuration: 100
});
最佳答案
尽管有这个问题 github startingTop
对我不起作用
我更改了 endingTop
并删除了 startingTop
,它正在运行!
关于jquery - 如何设置物化模式顶部?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46251217/