ionic 左右滑动 广告
来源:互联网 发布:淘宝如何查购买记录 编辑:程序博客网 时间:2024/05/16 13:57
使用ion-slide-box 命令做效果
<ion-slide-box><ion-slide ng-repeat="item in lists"> <div class="box blue"><a href="{{item.url}}" title=""> <img src="{{item.img}}" class="img_responsive"></a> </div></ion-slide></ion-slide-box>
控制器从服务器获取广告数据
//进入家政服务的导航页面angular.module("jiazhengApp").controller("jiazhengIndexController", ["$scope", "$state", '$http','khbjIndexService', 'jiazhengChuchenChumanService','jiazhengAppService',function ($scope, $state, $http,khbjIndexService,jiazhengChuchenChumanService,jiazhengAppService) {var url = "/index.php/Wap/Homemake/jzIndexAd.html";var p = $http.post(url);p.success(function(response,header,config,status){if(response.status == 1){$scope.lists = response.data;setTimeout('$(".box.blue").css("width",document.body.clientWidth+"px");$(".slider-slides").css("width","0px");',500);}});}]);
备注说明:
1、.slider-slides 控件的高度为0,整个广告位的高度由img图片撑开
2、img的图片为显示器的实际宽度
3、.img_responsive 的样式说明 :
.img_responsive {display: block;max-width: 100%;height: auto;}
0 0
- ionic 左右滑动 广告
- ionic 滑动块 ion-slide-box 左右无缝滚动
- ionic滚动条 左右滑动上拉刷新
- 手机webApp触摸左右滑动切换轮播图片广告
- ionic滑动
- 滑动事件左右滑动
- [Android学UI之二]实现网易新闻客户端左右滑动广告
- 左右浮动广告
- jquery左右浮动广告
- ionic 卡片滑动效果
- ionic星星评分 滑动
- android 滑动效果---左右滑动
- android滑动---锯齿状左右滑动
- android 手势左右滑动
- ViewFlipper 左右滑动效果
- Android 左右滑动 控件
- 判断左右触摸滑动
- android中的左右滑动
- ionic 日期控件 ionic-datepicker 学习
- angular router ui 路由模块(父子)层级说明
- angularjs ng-class学习笔记
- ionic 下拉分页 ion-infinite-scroll标签
- LightOJ 1078 Integer Divisibility (同余定理 )
- ionic 左右滑动 广告
- $ionicActionSheet 在android 手机中显示错乱的博客
- 矩阵快速幂专题(持续更新ing.avi)
- angular公共页面提供公共服务(例如获取小区)
- 线性代数矩阵的投影
- -webkit-line-clamp下多行文字溢出点点点...显示实例页面
- C语言中位操作
- angularjs ng-bind-html 指令 对html标签转译
- 无人驾驶汽车的体系结构