前端整体笔记(1Oct2022)

前端整体笔记(1Oct2022)

class起名

1 传统起名法
2 BEM起名法

传统起名法

布局类,交互类,状态类,包裹类。。。。

BEM命名

[block]__[element]–[modifier]

block 我的容器是谁
Element 我是谁
Modifier 我是什么形态

更多标签

button
strong
em
i
span

表格

音视频

表单

⽤于收集⽤户输⼊并提交的数据
<input type="text" name="username" value="jirengu">
<input type="password" name="password" >
收集到的数据
{
 "username": "jirengu",
 "password": "123456",
 "sex": "male",
 "birth": "2014/11/01",
 "hobby": ["music", "footbal"]
}

表单例子1

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <form class="form" action="/login" method="post">
        <h1 class="form__title">login</h1>
        <div class="form__input">
            <label for="username">loginName</label>
            <input id="username" class="form__username" name="username" type="text" required placeholder="Please enter your login name">
        </div>
        <div class="form__input">
            <label for="password">passord</label>
            <input id="password" class="form__password" name="password" type="password" autofocus placeholder="please enter your password">

        </div>
    </form>
</body>
</html>

表单例子2

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <form class="form" action="/login" method="post">
        <div class="form__hobby">
            <input name="hobby" type="checkbox" value="music"> La musique
            <input name="hobby" type="checkbox" value="football"> Le football
        </div>

    
        <div class="form__sex">
            <input name="sex" type="radio" value="female"> female
            <input name="sex" type="radio" value="male"> male
            <input name="sex" type="radio" value="notMentioned"> Not willing to say
        </div>

        <div class="form__textarea">
            <textarea name="intro"  cols="30" rows="10" placeholder="introduce yourself"></textarea>

        </div>
    

    </form>
</body>
</html>

表单例子3

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!--multiple size = "2" -->
    <select name="city">
        <option value="Paris">Paris</option>
        <option value="Rome">Rome</option>
        <option value="Peru">Peru</option>
    </select>

    <input type="email" placeholder="email">

    <input type="time" >


</body>
</html>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值