css 怎么叫表格上边加粗

html-css09

css 怎么叫表格上边加粗,第1张

在你对性上边表格的 td或者th 元素里边 添加border-top:**px solid #******属性

**px的*代表多少像素

#******的*代表颜色

例如:border-top:3px solid #959595

solid 实现

dotted 点线

dashed 虚线

希望可以帮到你。

在CSS 中常见的边框(border) 属性有以下几种:

border-style

border-width

border-color

border-top-, border-left-, border-bottom-, border-right-

border

border-style

border-style属性指定边框的样式。以下的表格列出这个属性可能有的值,以及每一个值显现出来的结果。

border-width

border-width属性是用来设定边框的宽度。可用的值为thin (薄)、medium (中等)、thick (厚),或是一个数字。

border-color

border-color属性是用来设定边宽的颜色。

border-top-, border-left-, border-bottom-, border-right-

我们可以将方向(top -上、bottom -下、left -左、right -右)和样式、宽度、及颜色合起来而成为一个属性。举例来说, border-top-style属性就是用来设定上边框的样式。以下举几个例子:

border

若四边的边框属性都一样,那我们可以用一个border属性来描述,而不必四个边都描述一次。另外,我们可以在同一行一次宣告边框样式、边框宽度、以及边框颜色。

p {

border:#0000FF 5px solid 

}

那以下的HTML,

<p>用一行来宣布所有边框的属性</p> 

会显现出

CSS 加粗使用CSS属性单词font-weight:

例子:

.yangshi1{ font-weight:bold}

.yangshi2{ font-weight:600}

font-weight对象值:从100到900,最常用font-weight的值为bold

font-weight参数:

normal : 正常的字体。相当于number为400。声明此值将取消之前任何设置

bold : 粗体。相当于number为700。也相当于b对象的作用

bolder : IE5+ 特粗体

lighter : IE5+ 细体

number : IE5+ 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900