Html
    Css
    Js

    
                        
.context {
	width:800px;
	height:300px;
	border:1px solid #ccc;
	display:-webkit-box;
	-webkit-box-orient:horizontal;
	position:relative;
}
.dm-y-list {
	width:200px;
	height:300px;
	border-left:1px solid #ccc;
	position:relative;
}
.send-dm {
	width:200px;
	height:34px;
	border:1px solid #ccc;
	position:absolute;
	bottom:0;
	left:0;
}
.dm-list-top {
	width:100%;
	height:30px;
	font-size:16px;
	text-align:center;
	line-height:30px;
	border-bottom:1px solid #ccc;
}
.send-dm input {
	width:116px;
	height:30px;
	float:left;
	border:1px solid #ccc;
}
.send-dm button {
	width:80px;
	height:34px;
	float:left;
	background:#0188FB;
	border:none;
	color:white;
}
.dm-list-cont {
	width:200px;
	height:236px;
	overflow:auto;
}
.dm-font-y {
	width:100%;
	height:auto;
	font-size:12px;
	margin-top:10px;
	white-space:pre-wrap;
}
.dm-font-x {
	width:auto;
	overflow:hidden;
	height:30px;
	color:white;
	line-height:30px;
	text-align:center;
	margin-left:600px;
	position:absolute;
	opacity:1;
}
.bg {
	width:600px;
	height:300px;
	z-index:999;
	background:rgba(0,0,0,.1);
	position:absolute;
	top:0;
	left:0;
	overflow:hidden;
}

                        
↑上面代码改变,会自动显示代码结果 jQuery调用版本:1.11.3
 立即下载

简单的弹幕实现

一个不爱抽烟的员工不是一个好的程序猿

1
      你的明天由我主演0
      2018/4/9 10:36:49