html设置table的边框基础

buttonChan 2011-08-29

css代码
<style type="text/css">
.blacktab {
  background: none repeat scroll 0 0 #FFFFFF;
  border-collapse: collapse;
  margin-top: 15px;
  text-align: center;
  width: 100%;
}

.blacktab td,th {
  border: 1px solid #000000;
  font-size: 14px;
  height: 22px;
  line-height: 22px;
  padding: 4px 8px;
}
</style>

html中table的代码

<table width="100%" cellspacing="0" cellpadding="0" border="0" class="blacktab">
    	<tr>
    		<th>网点名称</th>
    		<th>网点位置</th>
    		<th>营业时间</th>
    	</tr>
    	<tr>
    		<td>1</td>
    		<td>1</td>
    		<td>1</td>
    	</tr>
    	<tr>
    		<td>2</td>
    		<td>2</td>
    		<td rowspan="7">2</td>
    	</tr>
    	<tr>
    		<td>3</td>
    		<td>3</td>
    	</tr>
    	<tr>
    		<td>4</td>
    		<td>4</td>
    	</tr>
    	<tr>
    		<td>5</td>
    		<td>5</td>
    	</tr>
    	<tr>
    		<td>6</td>
    		<td>6</td>
    	</tr>
    	<tr>
    		<td>7</td>
    		<td>7</td>
    	</tr>
    	<tr>
    		<td>8</td>
    		<td>8</td>
    	</tr>
    </table>

相关推荐

jiong / 0评论 2020-09-17