angularjs实现时间轴效果的示例代码
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了angularjs实现时间轴效果的示例代码,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含3614字,纯文字阅读大概需要6分钟。
内容图文
AngularJS 是一个 JavaScript 框架。它是一个以 JavaScript 编写的库。它可通过 <script> 标签添加到 HTML 页面。 通过 指令 扩展了 HTML,且通过 表达式 绑定数据到 HTML。 是以一个 JavaScript 文件形式发布的,可通过 script 标签添加到网页中。本文主要介绍angularjs实现时间轴效果的示例代码。一 引入包
引入angular-timeline包。
下载地址:angular-timeline.zip
在index.html中引入
app.js中引用,不引用就没有效果。
二 改写css
根据需求改写css,核心部分的改写。
可以写在style.css中,也可以新建一个css文件,但是一定要在index.html中引用。
/* 时间轴 */ .timeline-event { margin-bottom: 0px !important; } timeline-badge.infos { background-color: #47d09e !important; } .timeline:before { width: 1px !important; left: 24px !important; margin-top: 30px !important; background-color: #47d09e !important; } timeline-badge { left: 16px !important; width: 15px !important; height: 15px !important; top: 15px !important; box-shadow: none !important; } timeline-panel { float: left !important; width: 85% !important; padding: 13px 0px 6px 0px !important; margin-left: 39px !important; background: none !important; border: none !important; box-shadow: none !important; } timeline-panel:before { visibility: hidden !important; } timeline-panel:after { visibility: hidden !important; display: none !important; } timeline-panel .time { font-size: 14px; font-family: 'PingFangSC-Regular'; } timeline-panel .detail { display: flex; display: -webkit-flex; align-items: center; -webkit-align-items: center; justify-content: space-between; -webkit-justify-content: space-between; margin-top: 10px; } timeline-panel .detail .linename { font-size: 16px; max-width: 80%; color: #1c1c1c; display: inline-block; font-family: 'PingFangSC-Medium'; } timeline-panel .detail .linelevel { position: absolute; right: 18%; border-radius: 4px; color: white; padding: 1px 5px 1px 5px; font-size: 11px; } timeline-panel .detail .linelevel-g { background-color: #f27373; } timeline-panel .detail .linelevel-p { background-color: #e29431; } timeline-panel .detail .linenum { float: right; font-size: 14px; color: #323232; }
三 页面
准备工作做完了,下面是页面的编写。
<!--html页面--> <ion-view view-title="{{title}}"> <ion-content scroll="true"> <timeline> <timeline-event ng-repeat="event in teamDataList" side="right"> <timeline-badge class="infos"> </timeline-badge> <timeline-panel class="infos"> <span class="time"> {{event.hour}} </span> <p class="detail" ng-repeat="item in event.data"> <span class="linename">{{item.customerName}}</span> <p style="float: right;"> <span class="linenum"> {{item.reserveNumber}}人 </span> </p> </p> </timeline-panel> </timeline-event> </timeline> </ion-content> </ion-view>
四 效果图
相关教程:
使用纯CSS3实现时间轴切换焦点图实例代码
CSS3实现时间轴效果方法
PHP实现时间轴函数代码_PHP教程
以上就是angularjs实现时间轴效果的示例代码的详细内容,更多请关注Gxl网其它相关文章!
内容总结
以上是互联网集市为您收集整理的angularjs实现时间轴效果的示例代码全部内容,希望文章能够帮你解决angularjs实现时间轴效果的示例代码所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。