纯css滚动公告栏目
2024-09-30 09:52:59
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
.wrap {
height: 30px;
overflow: hidden;
position: absolute;
top: 30;
left: 100;
width: 100%
} p {
margin: 0;
height: 30px;
line-height: 30px;
text-align: center;
background: #ccc;
width: 300px;
} .content p {
position: absolute;
} @-webkit-keyframes anim1 {
0% {
top: 40px;
opacity: 1
}
50% {
top: -40px;
opacity: 1
}
75% {
top: -40px;
opacity: 0
}
100% {
top: 40px;
opacity: 0
}
} @-webkit-keyframes anim2 {
0% {
top: -40px;
opacity: 0
}
25% {
top: 40px;
opacity: 0
}
50% {
top: 40px;
opacity: 1
}
100% {
top: -40px;
opacity: 1
}
}
.content p:nth-child(1) {
-webkit-animation: anim1 5s linear infinite;
} .content p:nth-child(2) {
-webkit-animation: anim2 5s linear infinite;
}
</style>
</head>
<body>
<div class="wrap">
<div class="content">
<p>第一条消息</p>
<p>第二条消息</p>
</div>
</div>
</body> </html>
最新文章
- Android 全局获取 Context 与使用 Intent 传递对象
- Android 断点续传 思路
- BZOJ 3542 [Poi2014]Couriers ——可持久化线段树
- Log4net介绍
- php + Redis 写的类似于新浪微博的feed系统
- poj_2674 弹性碰撞
- How to open .ccproj in VS2010?
- Jersey的异常处理
- JQ 日期格式化
- Swift补基础之Selector、条件编译、编译标记、NSObject
- SEO,你敢说你会吗?
- 事务管理在三层架构中应用以及使用ThreadLocal再次重构
- 转贴---Linux服务器性能评估
- jsp小结
- mysql export mysqldump version mismatch upgrade or downgrade your local MySQL client programs
- C. Maximal Intersection(STL)
- java封装的概念学习笔记
- 关于div文字点击编辑的插件
- ANSI码和UNICODE码
- jquery 鼠标事件汇总
热门文章
- [原创]JAVA获取word表格中数据的方案
- 【转载】asp.net 后台弹出提示框
- 安装Sublime Text 3插件的方法(转自Rising的博文)
- bzoj2431逆序对数列——递推
- Block 与 delegate
- Table View Programming Guide for iOS---(二)----Table View Styles and Accessory Views
- LXD安装
- 深入分析 JDK8 中 HashMap 的原理、实现和优化
- hdoj1116【欧拉回路】
- python __builtins__ int类 (36)