esayui给datagrid添加背景图片
2016-05-23 01:32
447 查看
1.easyui有一个给每行设置背景色的方法,这用这个方法,将每一行都设置成透明。要注意ie兼容问题
2. 给要设置背景图片的table外层加一个div,并给此div设置背景图片。
解析:如果不给每行设置为透明,则会出现一行有背景图片,一行没有背景图片的情况。这是因为datagrid的渲染发生在div背景图片之后。即使给div设置了层级,还是这样。
rowStyler: function(index,row){
//return 'background:rgba(255, 255, 255, 0.1)!important;filter:Alpha(opacity=60)!important; background:#fff!important;'; // return inline style
return 'background:transparent;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#7f000000,endColorstr=#7f000000);zoom: 1;'; // return inline style
// the function can return predefined css class and inline style
// return {class:'r1', style:{'color:#fff'}};
}
2. 给要设置背景图片的table外层加一个div,并给此div设置背景图片。
解析:如果不给每行设置为透明,则会出现一行有背景图片,一行没有背景图片的情况。这是因为datagrid的渲染发生在div背景图片之后。即使给div设置了层级,还是这样。
rowStyler: function(index,row){
//return 'background:rgba(255, 255, 255, 0.1)!important;filter:Alpha(opacity=60)!important; background:#fff!important;'; // return inline style
return 'background:transparent;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#7f000000,endColorstr=#7f000000);zoom: 1;'; // return inline style
// the function can return predefined css class and inline style
// return {class:'r1', style:{'color:#fff'}};
}
<!-- task list --> <div id="waterMark" style="z-index:999999;background: url(${path}/images/waterMark/shengting.png);background-size:100%,100%"> <table id="tasklist" width="98%"></table> </div>
相关文章推荐
- UIButton无法响应点击事件问题
- 频繁修改UIButton的文字引起的频闪问题解决办法
- require,include,require_once,include_once的区别
- LeetCode 96. Unique Binary Search Trees(唯一二叉树)
- LeetCode 95. Unique Binary Search Trees II(唯一二叉搜索树)
- java保存到数据库中文乱码,加useUnicode=true&characterEncoding=UTF-8
- use java code to cheng the layout of the UI
- 队列 Queue 与双端队列 Deque
- [基础]iOS UI测试
- UITableView--单组数据显示(纯手动代码实现)
- UITableView的性能优化
- iOS中的UITableView
- iOS中的UITableView自定义Cell(模仿新浪微博)
- Rebuild Instance 操作详解 - 每天5分钟玩转 OpenStack(37)
- 【2016杭电女生赛1010】【旅行商问题DP + 贪心】Ingress 最多走L距离 最多hackK次 的最大得分
- Arduino 101 IMU测试及问题
- bzoj4059【Cerc2012】Non-boring sequences
- Windows Server 2012 GUI与Core的切换
- hdu 2604 Queuing(矩阵优化DP)
- Android UI(Layouts)-RelativeLayout详解