zoukankan      html  css  js  c++  java
  • html5-4 HTML5超链接、URL地址和表格

    html5-4 HTML5超链接、URL地址和表格

    一、总结

    一句话总结:

    1、cellspace有什么用?

    清除表格的单元格间距

    26     <table border='1px' cellspacing='0px' width='100%'>

    2、页面中的字体一般用什么好,怎么设置?

    微软雅黑,在通用选择器里面选择

     7         *{
     8             font-family: 微软雅黑;
     9         }

    3、如何设置表格中的元素横向居中?

    给行tr设置横向居中,text-align:center

    16         tr{
    17             text-align:center;
    18             height:50px;
    19         }

    二、HTML5超链接、URL地址和表格

    1、相关知识

    超链接:
    <a href='http://www.baidu.com' target='_blank'>百度</a>

    图片超链接:
    <a href='http://www.baidu.com'>
        <img src='jin.png'>
    </a>

    url网址:
    http://www.baidu.com/index.php?id=10
    http http协议
    www.baidu.com 域名
    index.php 脚本文件
    id=10     脚本参数

    表格:
    <table width='100%' border='1px' cellspacing='0px'>
        <tr>
            <th>adlf</th>
            <th>adlf</th>
            <th>adlf</th>
        </tr>
        <tr>
            <td>aa</td>
            <td>aa</td>
            <td>aa</td>
        </tr>
    </table>

    2、代码

    table表格

     1 <!doctype html>
     2 <html lang="en">
     3 <head>
     4     <meta charset="UTF-8">
     5     <title>index</title>
     6     <style>
     7         *{
     8             font-family: 微软雅黑;
     9         }
    10         caption{
    11             font-size:30px;
    12             font-weight:bold;
    13             color:#999
    14         }
    15 
    16         tr{
    17             text-align:center;
    18             height:50px;
    19         }
    20         table,td,th{
    21             border-color:#0f0;
    22         }
    23     </style>
    24 </head>
    25 <body>
    26     <table border='1px' cellspacing='0px' width='100%'>
    27         <caption>用户表</caption>
    28         <tr>
    29             <th>编号</th>
    30             <th>用户名</th>
    31             <th>密码</th>
    32         </tr>
    33         <tr>
    34             <td colspan='3'>123</td>
    35         </tr>
    36         <tr>
    37             <td rowspan='4'>1</td>
    38             <td>user1</td>
    39             <td>123</td>
    40         </tr>
    41         <tr>
    42             <td>user1</td>
    43             <td>123</td>
    44         </tr>
    45         <tr>
    46             <td>user1</td>
    47             <td>123</td>
    48         </tr>
    49         <tr>
    50             <td>user1</td>
    51             <td>123</td>
    52         </tr>
    53     </table>
    54 </body>
    55 </html>
     
  • 相关阅读:
    ThreeJS中的点击与交互——Raycaster的用法
    threejs地球之后:动画的控制
    threejs创建地球
    3d模型一般怎么导入到到Threejs中使用
    用three.js开发三维地图实例
    threejs使用各种坑实验过程
    用threejs实现三维全景图
    用threejs 实现3D物体在浏览器展示
    小议线程之单线程、多线程、线程池
    小谈MVC 模式
  • 原文地址:https://www.cnblogs.com/Renyi-Fan/p/9207758.html
Copyright © 2011-2022 走看看