day05:字体样式、表格、表单及一系列使用

一、字体样式设置

1.字体大小:默认16px 最小8px

font-size: 22px;

2.字体颜色:color

color: #3850ff; 

3.字体粗细 默认600 最大900 最小200 bolder加粗

font-weight: 400;

font-weight: bolder; 

4.字体样式

font-style: italic; 

5.字体

font-family: Arial, Helvetica, sans-serif; 

另外:

        i标签:斜体

        b标签:加粗

        u标签:下划线

二、表格的使用

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
    <table border="1" cellspacing="0">
        <thead>
            <tr>
                <th>电影</th>
                <th>电视剧</th>
                <th>综艺</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td rowspan="2">悬崖之上</td>
                <td colspan="2">琅琊榜</td>
                <!-- <td>奔跑吧兄弟</td> -->
            </tr>
            <tr>
                <!-- <td>天堂的张望</td> -->
                <td>觉醒年代</td>
                <td>极限挑战</td>
            </tr>
        </tbody>
    </table>
</body>
</html>

 三、表单

1.action:后台地址 

  method:请求方式 get/post

get:会明文展示(拼在网站上)  不够安全  更快捷

post:不会明文 更安全  传入内容比较大(比如上传文件)

 <form action="http://www.baidu.com" method="POST">

name:给后台传值的描述(kety 键) 

placeholder:提示文字

value:默认值

2.文本输入框

<input type="text" name="username"  placeholder="请输入用户名">

<input type="password" value="dys" name="password">

3.提交按钮

 <input type="submit"> 

4.readonly只读    disabled 不可读也不可写

 <input type="text" disabled> 

5.单选框

<input type="radio" name="gender">

<input type="radio" name="gender"> 

6.多选框 

<p>兴趣爱好:</p>
<span>看书</span>
<input type="checkbox">
<span>学习</span>
<input type="checkbox">
<span>睡觉</span>
<input type="checkbox">

 7.文件上传

 <input type="file" >

8.重置按钮

 <input type="reset"> 

9.按钮标签

<input type="button" value="我是一个普通的按钮">

 <button>我也是个按钮</button> 

10.下拉选择框

<select name="" id="">
        <option value="">---请选择---</option>
        <option value="" selected>10~20岁</option>
        <option value="">20~80岁</option>
    </select>

 11.可输入区域

<textarea name="" id="" cols="30" rows="10"></textarea>

12.隐藏域

<input type="hidden" value="123" > 

五、表达元素样式

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <style>
       span{
           display: inline-block;
           width: 200px;
           height: 24px;
           border-radius: 1px solid darkgray;
           
       }
       input{
            border-radius: 5px;
       }
       img{
           width: 20px;
           margin-top: 2px;
       }
       .fl{
           float: left;
       }
    </style>
</head>
<body>
    <span>
        <input class="fl" type="text">
        <img class="fl" src="img/语音.png">
    </span>
</body>
</html>

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值