Html/CSS----表格与表单

2018-09-11  本文已影响0人  岸与海

表格

table、tr、th、td

caption、thead、tbody、tfoot

合并单元格

表格的样式

表单

表单

input

input是我们使用的最多的表单项,它可以 根据不同的type属性呈现不同的状态。
type属性可选值:
text:文本框
password:密码框
submit:提交按钮
radio:单选按钮
checkbox:多选框
reset :重置按钮

文本框

<input type="text" name="name">

密码框
<input type="password" name="pwd">

多选框
<input type="checkbox" name="sports">
单选框
<input type="radio" name="gender">

提交按钮
<input type="submit" value="提交">

下拉列表
<select>
<option>北京</option>
</select>

select、option

textarea

fieldset、legend、label

代码

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>作业9_11</title>
    <link rel="stylesheet" type="text/css" href="翻页布局.css"> 
    <link rel="stylesheet" type="text/css" href="导航条01.css">
</head>
<body>
    <div class="title">
        <a href="#" class="chao">上一页</a>
        <a href="#" class="chao">1</a>
        <a href="#" class="chao">2</a>
        <a href="#" class="chao">3</a>
        <a href="#" class="chao">4</a>
        <span><a href="#" class="yige">...</a></span>
        <a href="#" class="chao">18</a>
        <a href="#" class="chao">19</a>
        <a href="#" class="chao">20</a>
        <a href="#" class="chao">下一页</a>
    </div> 
    <div class="box">
        <ul>
            <li><a href="#">首页</a></li>
            <li><span>|</span></li>
            <li><a href="#">网站建设</a></li>
            <li><span>|</span></li>
            <li><a href="#">程序开发</a></li>
            <li><span>|</span></li>
            <li><a href="#">网络营销</a></li>
            <li><span>|</span></li>
            <li><a href="#">企业VI</a></li>
            <li><span>|</span></li>
            <li><a href="#">案例展示</a></li>
            <li><span>|</span></li>
            <li><a href="#">联系我们</a></li>
        </ul>
        
    </div>
    
    

</body>
</html>

结果

9_11.png

雪碧

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>雪碧练习</title>
    <style type="text/css">
        .box1:link{
            display:block;
            width: 130px;
            height: 50px;
            background-image: url(img/11.png);
            background-repeat: no-repeat; 
        }
        .box2:link{
            display: block;
            width: 42px
            height:30px;
            background-image: url(img/11.png);
            background-position: 0px -388px;
        }

    </style>

</head>
<body>
    <a href="#" class="box1"></a>
    <a href="#" class="box2"></a>

</body>
</html>
上一篇 下一篇

猜你喜欢

热点阅读