Html
    Css
    Js

    
                        
* {
	padding:0;
	margin:0;
}
.marquee-wrap {
	box-sizing:border-box;
	width:324px;
	height:64px;
	padding:20px;
	margin:16px auto 30px;
	background-image:linear-gradient(140deg,#ebd9eb 0%,#13bfdd 100%);
	line-height:24px;
	font-size:24px;
	text-align:center;
	border-radius:32px;
	overflow:hidden;
	user-select:none
}
.scroll_div {
	white-space:nowrap;
	overflow:hidden
}
.scroll_div pre {
	display:inline-block;
	padding:0 8px
}

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

原生JS文字横向滚动

更新时间:2021-11-11 00:10:51

0