CSS基础知识3

  • 列表样式
  • 表格样式
<!DOCTYPE html>
<!--DOCTYPE 是指定当前的html的版本,这里默认指定的是html5-->
<html>
<!--这里是html文件中的框架,将html文件括起来-->
<head>
  <meta charset="utf-8">
</head>

<body>
<ul style="list-style-type:disc; list-style-position: inside">

  <!--list-style-type : 前面圆圈的样式 disc square circle -->
  <!--lsit-style-image : url()-->
  <!--list-style-position : 换行的对齐方式不同inside outside -->
  <li>数学</li>
  <li>语文</li>
  <li>外语</li>
</ul>

<table style="border: 1px solid blue; border-collapse: collapse">
  <!--border : 画边框 粗细 样式 颜色-->
  <!--border-collapse : collapse调整边框重叠,加上之后两个边框重叠只会显示一个
                        seperable 两个框线是分开的-->
  <tr>
    <th style="border: 1px solid blue; vertical-align: top; text-align: right; width: 50px;
                      height: 100px; padding : 50px; caption-side: top; table-layout: auto">
      王勃
    </th>
    <!--table-layout : auto自动计算列宽 fixed列宽由第一行的列宽决定-->
    <!--text-align : 文本的对齐方式 right left center -->
    <!--vertical-algin : 垂直方向上文字的对齐方式-->
    <!--padding : 文字和框之间的间隔-->
    <!--caption-side : 指定caption在表的上面还是下面-->
    <th style="border: 1px solid blue ">李白</th>
    <th style="border: 1px solid blue ">杜甫</th>
    <th style="border: 1px solid blue ">苏轼</th>
  </tr>

  <tr>
    <th>子安</th>
    <th>太白</th>
    <th>子美</th>
    <th>子瞻</th>

  </tr>
<caption>成绩</caption>
</table>

</body>

</html>

显示效果 :
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

中小庸

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值