首页 > 开发 > CSS > 正文

css 细线表格 css制作table细线表格常用属性

2024-07-11 08:33:59
字体:
来源:转载
供稿:网友

Css制作table细线表格
1、介绍了一个不常用属性:border-collapse:collapse;
2、使用了一个属性缩写技巧:border:style color;border-width:上 右 下 左;


提示:您可以先修改部分代码再运行


table {
border-collapse:collapse; /* 关键属性:合并表格内外边框(其实表格边框有2px,外面1px,里面还有1px哦) */
border:solid #999; /* 设置边框属性;样式(solid=实线)、颜色(#999=灰) */
border-width:1px 0 0 1px; /* 设置边框状粗细:上 右 下 左 = 对应:1px 0 0 1px */
}

<thead> 表格头
<tbody> 表格正文
<tfoot> 表格?呵呵,我也不知道怎么说。明白就行了


<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″ />
<title>Css制作table细线表格</title>
<style type=”text/css” media=”screen”>

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表