CSS入门 0x5 表格和表单的样式

本文介绍了CSS在处理数据表格和表单布局方面的应用。首先讲解了如何使用CSS美化数据表格,接着详细阐述了表单布局的技巧,包括fieldset、legend等元素的使用,以及日历组件的样式设计。

数据表格

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>表单</title>
        <style>
            table.cal {
                border-collapse: separate;
                border-spacing: 0;
                text-align: center;
                color: #333;
            }
            .cal th,.cal td {
                margin: 0;
                padding: 0;
            }
            .cal caption {
                font-size: 1.25em;
                padding-top: 0.692em;
                background-color: #d4dde6;
            }
            .cal caption [rel="prev"]{
                float: left;
                margin-left: 0.2em;
            }
            .cal caption [rel="next"]{
                float:right;
                margin-right: 0.2em;
            }
            .cal caption a:link,
            .cal caption a:visited{
                text-decoration: none;
                color: #333;
                padding: 0 0.2em;
            }
            .cal caption a:hover,
            .cal caption a:active,
            .cal caption a:focus{
                background-color: #6d8ab7;
            }
            .cal thead th {
                background-color: #d4dde6;
                border-bottom: 1px solid #a9bacb;
                font-size: 0.875em;
            }
            .cal tbody td {
                border-top: 1px solid #e0e0e1;
                border-right: 1px solid #9f9fa1;
                border-bottom: 1px solid #acacad;
                border-left: 1px solid #dfdfe0;
            }
            .cal tbody a{
                display: block;
                text-decoration: none;
                color: #333;
                background-color: #c0c8d2;
                font-weight: bold;
                padding: 0.385em 0.692em 0.308em 0.692em;
            }
            .cal tbody a:hover,
            .cal tbody a:focus,
            .cal tbody a:active,
            .cal tbody .selected a:link,
            .c
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值