zoukankan      html  css  js  c++  java
  • 非IE浏览器中table标签出现边框的问题

    问题:在非IE浏览器中,如果使用gridview来生成table显示数据的话,通常会在生成的table中出现边框的情况,如下图

    我们打开firebug这个插件来看看html代码,发现

    在gridview生成的table中,会多了一个rules这个属性,我们来查一下html手册,发现

    RULES Attribute | rules Property

    Internet Development Index

    Sets or retrieves which dividing lines (inner borders) are displayed.

    Syntax

    HTML <TABLE RULES = sRule... >
    Scripting TABLE.rules [ = sRule ]

    Possible Values

    sRule String that specifies or receives one of the following values.
    all Borders are displayed on all rows and columns.
    cols Borders are displayed between all table columns.
    groups Horizontal borders are displayed between all tHead, tBody, and tFoot objects; vertical borders are displayed between all colGroup objects.
    none All interior table borders are removed.
    rows Horizontal borders are displayed between all table rows.

    结果很明显了,当rules的属性值为all的时候,是会出现行和列的边框的,那么我们怎么解决这个问题呢??

    我们发现,在gridview的属性中,有一个叫做GridLines的,它的值默认为Both

    我们修改一下,把属性值设置为None,如下图所示

    我们再看看效果,发现原来在table中的边框已经没有了

  • 相关阅读:
    xgzc— math 专题训练(一)
    floyd判圈算法
    CF961G Partitions
    luoguP4778 Counting swaps
    AT3913 XOR Tree(巧妙转换+状压dp)
    手动实现aop编程
    代理模式
    spring重点一:处理对象创建时间 个数以及方式
    spring helloword
    spring用来干什么,解决的问题
  • 原文地址:https://www.cnblogs.com/cookies9/p/1959689.html
Copyright © 2011-2022 走看看