需求:真机环境运行时提示框在页面中间,样式背景为黑色。
修改前:
修改后:
html:
<div class="mui-content">
<button type="button" id="hint">测试</button>
</div>
js:
mui('.mui-content').on('tap', '#hint', function() {
//mui.toast("成功")
mui.toast("成功", {
duration:'short',
type:'div'
})
})
css:
.mui-toast-container {
bottom: 50%;
}