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

  • 相关阅读:
    OpenGL编程 基础篇(二)Sierpinski垫片
    PAT1045. Favorite Color Stripe
    OpenGL编程 基础篇(一)
    百练1145:Tree Summing
    百练1745:Divisibility
    百练1321:棋盘问题
    Scrapy架构及其组件之间的交互
    MongoDB快速入门
    Redis快速入门
    Memcache所有方法及参数详解
  • 原文地址:https://www.cnblogs.com/cookies9/p/1959689.html
Copyright © 2011-2022 走看看