尝试使用视差效果创建个人投资组合页面以进行评估。 即使我将min-height属性值设置为100%,背景图像也会在屏幕中间显示为小条。
请参阅下面的代码:
https://codepen.io/HacNass/pen/Ozmzxg?editors=1100
try {
JSONObject jsonObject = new JSONObject("{\"level\":[{\"id\":\"1\",\"name\":\"first\",\"time\":\"00:02:00\"},{\"id\":\"2\",\"name\":\"second\",\"time\":\"00:03:00\"},{\"id\":\"3\",\"name\":\"math\",\"time\":\"00:03:00\"}, {\"id\":\"4\",\"name\":\"language \",\"time\":\"00:03:00\"},{\"id\":\"5\",\"name\":\"sport\",\"time\":\"00:04:00\"}]}");
JSONArray level = jsonObject.getJSONArray("level");
for (int i = 0; i < level.length(); i++) {
JSONObject data = level.getJSONObject(i);
String id = data.getString("id");
String name = data.getString("name");
String time = data.getString("time");
Log.d("JSONDATA--->", "Data at: " + i + " " + id + ":" + name + ":" + time);
}
} catch (JSONException e) {
e.printStackTrace();
}
感谢您的回答。