Skip to content

Commit 21b520f

Browse files
committed
edit width and height
1 parent f4da8b1 commit 21b520f

File tree

1 file changed

+39
-15
lines changed

1 file changed

+39
-15
lines changed

index.html

Lines changed: 39 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ <h2>手机价格分布</h2>
7171
<h2>不卖肾,攒几个月的钱够买一部IPhone XS?</h2>
7272
<div class="container">
7373
<div id="echart8"></div>
74-
<div id="iphoneXS"></div>
74+
<div id="iphoneXS"><img src="iphoneX.jpg"></div>
7575
</div>
7676
<p class="note">数据来源:国家统计局 采集时间:支出2018年/收入2017年</p>
7777
<p>在众多手机品牌中,IPhone的价格一直居于高位,每每有新品发售,就会有网友调侃“肾都不够卖了”,但玩笑归玩笑,在不卖肾的情况下,几个月存款能负担起一部高价的苹果手机呢?国家统计局的数据显示,城镇非私营单位就业人员月平均工资最高10975元,最低4637元;人均最高月消费5216元,最低2287元。据此我们可以进行一个粗略的计算,(平均工资-平均消费水平)/手机价格。在一线城市正常消费,大约攒4个月的钱就可以拥有一部IPhone XS;在二、三线城市正常生活,购买一部XS大约需要攒钱5-6个月。</p>
@@ -119,13 +119,32 @@ <h2>只选对的不选贵的</h2>
119119
width: 64%;
120120
float: left;
121121
}
122+
/* .container {
123+
overflow: hidden;
124+
height: 400px;
125+
width: 860px;
126+
} */
127+
/* 清除浮动 */
128+
129+
.container:after {
130+
/* content: "\0020";
131+
display: block;
132+
height: 0;
133+
clear: both; */
134+
clear: both;
135+
content: '';
136+
display: block;
137+
width: 0;
138+
height: 0;
139+
visibility: hidden;
140+
}
122141

123142
.container {
124143
overflow: hidden;
125144
height: 400px;
126-
width: 860px;
145+
width: 100%;
146+
zoom: 1;
127147
}
128-
/* 清除浮动 */
129148

130149
#echart6 {
131150
height: 500px;
@@ -141,29 +160,33 @@ <h2>只选对的不选贵的</h2>
141160

142161
#echart8 {
143162
height: 400px;
144-
/* width: 70%; */
145-
width: 600px;
163+
width: 70%;
164+
/* width: 600px; */
146165
float: left;
147166
margin-right: 5px;
148167
}
149168

150169
#iphoneXS {
151170
float: left;
152-
/* width: 28.5%; */
153-
width: 255px;
154-
height: 400px;
155-
background: url("iphoneX.jpg") no-repeat;
156-
background-size: cover;
157-
background-position: center center;
171+
width: 28.5%;
172+
/* width: 255px; */
173+
height: 100%;
174+
/* background: url("iphoneX.jpg") no-repeat; */
175+
/* background-size: cover;
176+
background-position: center center; */
158177
}
159-
/* #iphoneXS img {
160-
position: absolute;
178+
179+
#iphoneXS img {
180+
width: 95%;
181+
height: 75%;
182+
/* position: absolute;
161183
top: 0;
162184
bottom: 0;
163185
left: 0;
164186
right: 0;
165-
margin: auto;
166-
} */
187+
margin: auto; */
188+
margin-top: 20%;
189+
}
167190

168191
#change {
169192
margin: 0 auto;
@@ -182,6 +205,7 @@ <h2>只选对的不选贵的</h2>
182205

183206
#background {
184207
margin: 0 auto;
208+
/* height: 100%; */
185209
height: 720px;
186210
/* width: 1519px; */
187211
width: 100%;

0 commit comments

Comments
 (0)