1.css样式
<style>
.ts-alert{
position:fixed;
top:50px;
left:50%;
z-index:999;
white-space: normal;
min-width: 200px;
text-align: center;
padding: 15px;
padding-right: 15px;
margin-bottom: 20px;
border:1px solid #e0e0e0;
border-radius: 4px;
box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.5);
background-color: #DFF0D8;
height: 30px;
font-size: 14px;
}
.ts-alert-text{
text-align:center;
font-weight:bold;
white-space: normal;
line-height:24px;
}
button.close {
-webkit-appearance: none;
padding: 0;
cursor: pointer;
background: 0 0;
border: 0;
float: right;
font-size: 21px;
font-weight: 700;
line-height: 1;
text-shadow: 0 1px 0 #fff;
color:#222;
margin-left:5px;
line-height:26px;
}
2.jquery代码