一 样式
<style type="text/css">
@keyframes show {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes hide {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
.toast_box {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
/*background-color: rgba(0,0,0,0.5);*/
overflow: hidden;
display: none;
}
.toast_box p {
position: absolute;
bottom: 50%;
left: 50%;
z-index: 10;
transform: translate(-50%, -50%);
box-sizing: border-box;
padding: 10px 20px;
width: 350px;
/* 提示框的背景色 */
background: #707070;