【效果设计】模拟公交车站站台显示
来源:互联网 发布:怎么引入js文件 编辑:程序博客网 时间:2024/04/27 14:30
<!DOCTYPE ><html> <head> <script type="text/javascript" src="jquery-1.8.0.js"></script> <style> ul { width: 508px; margin: 0px; padding: 15px; height: 192px; /*定义flex伸缩盒*/ display: -webkit-flex; /*设置伸缩盒的子元素向两端对齐*/ justify-content: space-between; } ul li { font-size: 20px; /*固定宽度使文字强制换行竖直排列*/ width: 20px; text-align: center; display: -webkit-flex; /*设置伸缩盒的子元素向两端对齐*/ justify-content: space-between; /*设置子元素的排列方向是竖直方向*/ flex-direction: column; } </style> </head> <body> <div style="width: 718px;height: 252px;background-color: #CCCCCC;border: 1px solid red;"> <div style="float: left;width: 170px;height:252px;background-color: #ffffff;"> <div style="width: 170px;height: 170px;text-align: center;line-height: 180px;"> <div style="font: '微软雅黑' ; color: black;font-size:90px">127</div> </div> <div style="width: 170px;height: 82px;text-align: center;line-height: 20px;"> 下一站:</br> 春江新城 </div> </div> <div style="float: right;width: 548px;height:252px;"> <div style="height: 60px;width: 548px;background-color: #ffffff;text-align: center;line-height: 60px;"> 开往春江新城 </div> <div id="siteArea" style="height: 192px;width: 548px;background-color: #CCCCCC;"> </div> </div> </div> <script> var siteNameArr = new Array("春江新城", "江泉路", "春江路西站", "春江路东站", "铁心桥", "宁双路", "天隆寺地铁站", "石子岗", "菊花台公园", "安德门地铁站", "安德门"); $().ready(function() { updateSite(); }) function updateSite(){ $("#siteArea").html(""); var str = "<ul>"; var num = Math.floor(Math.random()*10); for(var i = 0; i < siteNameArr.length; i++) { if(i===num){ str = str + "<li style='height: 182px;'><div style='border-radius:50%;width:100%;height:20px;background-color: red;'>" + "</div><div style='width:100%;height:160px;'>"+ siteNameArr[i] + "</div></li>" }else{ str = str + "<li style='height: 182px;'><div style='border-radius:50%;width:100%;height:20px;background-color: #ffffff;'>" +"</div><div style='width:100%;height:160px;'>" + siteNameArr[i] + "</div ></li>" } } str = str + "</ul>" $("#siteArea").append(str); } setInterval("updateSite()",1000); </script> </body></html>
视频展示
阅读全文
0 0
- 【效果设计】模拟公交车站站台显示
- 早上的公交站台
- 情缘公交车站
- 周边公交站台接口 查询附近的公交站台
- 公交站台广告牌滚动效果图
- 公交站台信息的低耦合展示
- 成都女孩公交站台广告征婚
- 世界上最美丽的公交车站
- 车站
- 车站
- 洛谷1011 车站(数学,模拟)
- 昆明“路中式”公交站台使用15年后被拆除(图)
- 移动出行时代,你还在站台“傻等”公交吗?
- 模拟Matlab显示图像的效果
- 旧金山抗议者递交诉状,禁止科技公司班车使用公交车站
- AndroidStudio 中使用 百度地图 <五> 百度地图的搜索附近的美食,公交站台等,个人摘要
- Java 多线程初探索之模拟车站多窗口售票
- 公交
- MAC Elasticsearch安装
- junit测试spring整合activeMQ报错:java.lang.IllegalStateException: Failed to load ApplicationContext
- IPC进程间通信原理分析
- Python函数式编程——map()、reduce()
- Python爬取妹子网图片
- 【效果设计】模拟公交车站站台显示
- Git 学习笔记2
- 数组元素去重
- 基数排序
- 【JavaScript】事件委托
- Java并发学习(十二)-ReentrantLock分析
- php基础之日期时间函数(4)
- leetcode---roman-to-integer---字符串
- opengl es绘制四边形的三种方法