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中的边框已经没有了

  • 相关阅读:
    视频相关一些基础概念解析
    git
    mysql数据库查找类型不匹配
    matlab转python
    神经网络(二)
    python图片处理(三)
    python图片处理(二)
    python图片处理(一)
    python图片处理和matlab图片处理的区别
    MapReduce原理与设计思想
  • 原文地址:https://www.cnblogs.com/cookies9/p/1959689.html
Copyright © 2011-2022 走看看