vue文字滚动消息效果

代码语言:html

所属分类:布局界面

代码描述:vue文字滚动消息效果

代码标签: 消息 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
div, ul, li, span, img {
	margin: 0;
	padding: 0;
	display: flex;
	box-sizing: border-box;
}
.marquee {
	width: 100%;
	height: 50px;
	align-items: center;
	color: #3A3A3A;
	background-color: #ffe4ca;
	display: flex;
	box-sizing: border-box;
}

.marquee_title {
	padding: 0 20px;
	height: 30px;
	font-size: 14px;
	border-right: 1px solid #fff;
	align-items: center;
}

.marquee_box {
	display: block;
	position: relative;
	width: 60%;
	height: 30px;
	overflow: hidden;
}

.marquee_list {
	display: block;
	position: absolute;
	top: 0;
	left: 0;
}
.marquee_top {
	transition: all 0.5s;
	margin-top: -30px
}

.marquee_list li {
	height: 30px;
	line-height: 30px;
	font-size: 14px;
	padding-left: 20px;
}

.marquee_list li span {
	padding: 0 2px;
}

.red {
	color: #FF0101;
}

</style>
</head>
<body>
<h3 style="line-height: 50px;text-align: center">vue文字滚动</h3>
<div class="vueBox">
<div class="marquee">
<div class="marquee_title">
<span>最新公告</span>
</div>
<div class="marquee_box">
<ul class="marquee_list" :class="{marquee_top:animate}">
<li v-for="(item, index) in marqueeList">
<span>{{item.name}}</span>
<span>-</span>
<span class="red"> {{item.city}}</span>
<span>销售</span>
<span class="red"> {{item.amount}}<.........完整代码请登录后点击上方下载按钮下载查看

网友评论0