易截截图软件、单文件、免安装、纯绿色、仅160KB

css 设置好TD 同时存在treeview与gridview的时候

让treeview不显示td网格线 gridview显示网格线
HTML 
<style type="text/css">
        TD
        {
            font-size: 9pt;
            color: #000000;
            font-family: 宋体;
            border-right: #6C9FDB 0px solid;
            border-top: #6C9FDB 0px solid;
            border-left: #6C9FDB 0px solid;
            border-bottom: #6C9FDB 0px solid;
            border-collapse: collapse;
        }
    </style>
.cs
 protected void myDataGrid_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            e.Row.Cells[0].Attributes.Add("style", "border:1px   #6C9FDB");
            e.Row.Cells[1].Attributes.Add("style", "border:1px   #6C9FDB");
            e.Row.Cells[2].Attributes.Add("style", "border:1px   #6C9FDB");
            e.Row.Cells[3].Attributes.Add("style", "border:1px   #6C9FDB");
            e.Row.Cells[4].Attributes.Add("style", "border:1px   #6C9FDB");
    &


相关文档:

CSS Border


首先要说的是元素的border,元素的边框 (border) 是围绕元素内容和内边距的一条或多条线。CSS border 属性允许你规定元素边框的样式、宽度和颜色。
CSS 边框
在 HTML 中,我们使用表格来创建文本周围的边框,但是通过使用 CSS 边框属性,我们可以创建出效果出色的边框,并且可以应用于任何元素。
元素外边距内就是元素 ......

CSS: z index 取值范围


原理:
当两个同父元素z-index相同时,后面的元素显示在上面。
当z-index超过浏览器最大值时,浏览器会按最大值计算。
方法:
连续放置两个div元素d1,d2;并设定position:absolute及不同背景色。
设定d1.z-index = max + 1, d2.z-index = max;
当max + 1有效时,d1在前;当max + 1 无效时,d2在前。(参看原理) ......

CSS 学习必备网站

W3School:http://www.w3school.com.cn/css/index.asp
英文版网址:http://www.w3schools.com/css/default.asp
作为初学者,这是一定要收藏的网站。这就相当于一本CSS入门教程,在此可以学习每个标签,属性的用法和实例,可以自动动手实践代码。除了CSS的知识,这个网站还包括了大量其他网页开发语言教程和其他知识。
CSS ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号