CSS操作テーブルの枠線とテーブルの属性サンプルコード

11051 ワード

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
    table{
      
        /*border-collapse:collapse;        */
        border-spacing:20px; /*                 */
        table-layout:fixed;
    }
style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>     title>
head>
<body>
    <table border="1px" width="400px" height="300px" align="center" >
            <tr>
                <th>  th>
                <th>  th>
                <th>  th>
            tr>     
            <tr>
                <td>  td>
                <td>98td>
                <td> td>
            tr>      
            <tr>
                <td>  td>
                <td>50td>
                <td>                              td>
            tr>     
            <tr>
                <td>    td>
                <td >  td>
            tr>      
    table>
body>
html>
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
    /* 
        div        。
    */
    div{
      
        width:100px;
        height:100px;
        border-style:dotted solid double ; /*                 */
        border-color:#F00;
        border-bottom-color:#0FF;
        border-top-width:100px;
    }
style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>     title>
head>
<body>
    <div>      divdiv>
    
body>
html>

 
転載先:https://www.cnblogs.com/loaderman/p/10005626.html