html中怎么去掉表格边框线的?

html中怎么去掉表格边框线的?,第1张

border="0"可以去除边框以下是关于border的一些相关资料:定义和用法border

属性在一个声明中设置所有边框属性。语法:Object.style.border=borderWidth

borderStyle

borderColorborderWidth

设置边框的宽度。

thinmediumthicklengthborderStyle

设置边框的样式

nonehiddendotteddashedsoliddoublegrooveridgeinsetoutsetborderColor

设置边框的颜色。

color-namecolor-rgbcolor-hextransparent实例本例改变元素的边框:<html><head><style

type="text/css">p{

border:

thin

dotted

#FF0000}</style><script

type="text/javascript">function

changeBorder(){document.getElementById("p1").style.border="thick

solid

#0000FF"}</script></head><body><input

type="button"

onclick="changeBorder()"value="Change

border"

/><p

id="p1">This

is

a

paragraph</p></body></html>

就是把td的边框设成0

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/htmlcharset=utf-8" />

<title>无标题文档</title>

<style>

table{

border-collapse:collapse//表格单元格间距样式

border:1px solid #0F0

}

tr{border:1px solid #0F0}

td{

border:0px}

</style>

</head>

<body>

<table width="200">

<tr>

  <td>&nbsp</td>

  <td>&nbsp</td>

  <td>&nbsp</td>

  <td>&nbsp</td>

  <td>&nbsp</td>

  <td>&nbsp</td>

</tr>

<tr>

  <td>&nbsp</td>

  <td>&nbsp</td>

  <td>&nbsp</td>

  <td>&nbsp</td>

  <td>&nbsp</td>

  <td>&nbsp</td>

</tr>

<tr>

  <td>&nbsp</td>

  <td>&nbsp</td>

  <td>&nbsp</td>

  <td>&nbsp</td>

  <td>&nbsp</td>

  <td>&nbsp</td>

</tr>

<tr>

  <td>&nbsp</td>

  <td>&nbsp</td>

  <td>&nbsp</td>

  <td>&nbsp</td>

  <td>&nbsp</td>

  <td>&nbsp</td>

</tr>

</table>

</body>

</html>

有HTML代码吗?你的这个按照我的HTML代码默认就是不带内边框的,除非给table加边框。但是加了就消除不了竖边框,所以我觉得此题是不是不是考的哪一句是消除,而是让你写出来呢。(根据当前能看到的分析的)


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/8326566.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-15
下一篇 2023-04-15

发表评论

登录后才能评论

评论列表(0条)

保存