html如何將表格邊框隱藏

本篇內(nèi)容主要講解“html如何將表格邊框隱藏”,感興趣的朋友不妨來看看。本文介紹的方法操作簡單快捷,實(shí)用性強(qiáng)。下面就讓小編來帶大家學(xué)習(xí)“html如何將表格邊框隱藏”吧!

成都創(chuàng)新互聯(lián)公司專注于丹鳳企業(yè)網(wǎng)站建設(shè),自適應(yīng)網(wǎng)站建設(shè),商城網(wǎng)站開發(fā)。丹鳳網(wǎng)站建設(shè)公司,為丹鳳等地區(qū)提供建站服務(wù)。全流程按需規(guī)劃網(wǎng)站,專業(yè)設(shè)計,全程項(xiàng)目跟蹤,成都創(chuàng)新互聯(lián)公司專業(yè)和態(tài)度為您提供的服務(wù)

html將表格邊框隱藏的方法:1、使用style屬性給table、th、td元素添加“border: none;”樣式;2、使用style屬性給table元素添加“border-color: transparent;”樣式。

本教程操作環(huán)境:windows7系統(tǒng)、CSS3&&HTML5版、Dell G3電腦。

我們有下面一個表格:

<table border="1">
	<tr>
		<th>姓名</th>
		<th>年齡</th>
	</tr>
	<tr>
		<td>Peter</td>
		<td>20</td>
	</tr>
	<tr>
		<td>Lois</td>
		<td>20</td>
	</tr>
</table>

html如何將表格邊框隱藏

怎么將這個表格的邊框隱藏起來?下面介紹一下方法:

1、給table、th、td元素添加border: none;樣式

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
	</head>

	<body>
<table border="1" style="border: none;">
	<tr>
		<th  style="border: none;">姓名</th>
		<th  style="border: none;">年齡</th>
	</tr>
	<tr>
		<td style="border: none;">Peter</td>
		<td style="border: none;">20</td>
	</tr>
	<tr>
		<td style="border: none;">Lois</td>
		<td style="border: none;">20</td>
	</tr>
</table>
	</body>
</html>

html如何將表格邊框隱藏

2、給table元素添加border-color: transparent;樣式

<table border="1" style="border-color: transparent;">
	<tr>
		<th>姓名</th>
		<th>年齡</th>
	</tr>
	<tr>
		<td>Peter</td>
		<td>20</td>
	</tr>
	<tr>
		<td>Lois</td>
		<td>20</td>
	</tr>
</table>

html如何將表格邊框隱藏

到此,相信大家對“html如何將表格邊框隱藏”有了更深的了解,不妨來實(shí)際操作一番吧!這里是創(chuàng)新互聯(lián)網(wǎng)站,更多相關(guān)內(nèi)容可以進(jìn)入相關(guān)頻道進(jìn)行查詢,關(guān)注我們,繼續(xù)學(xué)習(xí)!

當(dāng)前題目:html如何將表格邊框隱藏
分享地址:http://muchs.cn/article14/pppdge.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供電子商務(wù)、域名注冊、網(wǎng)站導(dǎo)航虛擬主機(jī)、網(wǎng)頁設(shè)計公司、外貿(mào)網(wǎng)站建設(shè)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

手機(jī)網(wǎng)站建設(shè)