Bootstrap4
- row
默认带有margin,图片会出现横向滚动条,在其上层增加一个container
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/338645e0b5003dda0009f4f1add21ef2.png)
类手机端toast
function Toast(msg,duration){
duration=isNaN(duration)?3000:duration;
var m = document.createElement('div');
m.innerHTML = msg;
m.style.cssText="width:60%; min-width:150px; background:#000; opacity:0.5; height:40px; color:#fff; line-height:40px; text-align:center; border-radius:5px; position:fixed; top:60%; left:20%; z-index:999999; font-weight:bold;";
document.body.appendChild(m);
setTimeout(function() {
var d = 0.5;
m.style.webkitTransition = '-webkit-transform ' + d + 's ease-in, opacity ' + d + 's ease-in';
m.style.opacity = '0';
setTimeout(function() { document.body.removeChild(m) }, d * 1000);
}, duration);
}