二栏布局一栏自适应和三栏布局中间自适应

二栏布局一栏自适应

效果图:
这里写图片描述

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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>二栏布局</title>
<style type="text/css">
body{
margin: 0;
padding: 0;
height:100%;
}
.wrapper .left{
height: 200px;
margin-left:-200px;float:left;width:100%;
background: green;
word-wrap: break-word;
}
.wrapper .right{
height: 200px;
width: 200px;
background: blue;
float: right;
word-wrap: break-word;
}
</style>
</head>
<body>
<div class="wrapper">
<div class="left">123123131321321321231231321231231313213213212312313212312313132132132123123132</div>
<div class="right">13232132132132132132132132132123123131321321321231231321231231313213213212312313212312313132132132123123132</div>
</div>
</body>
</html>

三栏布局中间自适应

效果图:
这里写图片描述

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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>三栏布局</title>
<style>
*{
margin: 0;
padding:0;
}
.right, .left{
width: 100px;
}
.right, .left, .middle{
height: 100px;
}
.right{
float: right;
background-color:#ffc;
opacity: 0.5;
}
.left{
float: left;
background-color:#fcc;
opacity:0.5;
}
.middle{
margin: 0 100px;
background-color:orange;
}
</style>
</head>
<body>
<div class="right"></div>
<div class="left"></div>
<div class="middle"></div>
</body>
</html>
越来越多的平台(微信公众平台,新浪微博,简书,百度打赏等)支持打赏功能,付费阅读时代越来越近,特此增加了打赏功能,支持微信打赏和支付宝打赏。坚持原创技术分享,您的支持将鼓励我继续创作!