HTML布局之左右结构,左边固定右边跟据父元素自适应

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
    ul {
        list-style-type: none;
        padding: 0;
        margin: 0;
    }
    .item {
        overflow: hidden;
        zoom: 1;
        font-size: 12px;
        margin-bottom: 20px;
    }
    .item .item-title {
        float: left;
        width: 85px;
        font-size: 14px;
        font-weight: 400;
        text-align: right;
    }
    .item .item-con {
        overflow: hidden;
        zoom: 1;
    }
    em,i {
        font-style: normal;
    }
    p {
        margin: 0.3em 0;
    }
    .star {
        color: #F00;
        margin-right: 5px;
    }
    .tips-text {
        color: #ccc;
    }
    .input {
        border: 1px solid #ccc;
        padding: 2px 5px;
        margin: 0;
    }
    </style>
</head>
<body>
<ul>
    <li class="item">
        <div class="item-title">
            <em class="star">*</em><label for="">邮件地址</label><i>:</i>
        </div>
        <div class="item-con">
            <input class="input" placeholder="建议用手机号码注册" type="text" />
            <p class="tips-text">6~18个字符,可使用字母、数字、下划线,需以字母开头</p>
        </div>
    </li>
    <li class="item">
        <div class="item-title">
            <em class="star">*</em><label for="">密码</label><i>:</i>
        </div>
        <div class="item-con">
            <input class="input" type="text" />
            <p class="tips-text">6~16个字符,区分大小写</p>
        </div>
    </li>
    <li class="item">
        <div class="item-title">
            <em class="star">*</em><label for="">确认密码</label><i>:</i>
        </div>
        <div class="item-con">
            <input class="input" type="text" />
            <p class="tips-text">请再次填写密码</p>
        </div>
    </li>
</ul>
</body>
</html>