在相等的CSS浮点div之间仅移动空白空间

时间:2018-08-21 23:47:00

标签: html css mobile css-float

我有以下HTML / CSS:https://codepen.io/neilnm/pen/MqYONR

String st;

            BufferedReader Br = null;
            FileOutputStream outFile1 = new FileOutputStream(
                    new File("C:\\DATA\\data.xls"));
            Workbook book = new HSSFWorkbook();
            File objFile = new File(
                    "C:\\DATA\\records.txt");

            Br = new BufferedReader(new FileReader(objFile));

            LineNumberReader lineNumberReader = new LineNumberReader(new FileReader(objFile));
            lineNumberReader.skip(Long.MAX_VALUE);
            int lines = lineNumberReader.getLineNumber();
            Sheet sheet = book.createSheet("UserData");

            System.out.println(lines);
            int line = 0;

            while ((st = Br.readLine()) != null) {

                String value = st.replace("\"", "");

                arraylist = value.split(",");

                Row row = null;

                Cell cell = null;

                row = sheet.createRow(line);

                for (int i = 0; i < arraylist.length; i++) {

                    // System.out.println(arraylist[i]);

                    cell = row.createCell(i);

                    cell.setCellValue(arraylist[i]);

                }

                line++;
                System.out.println("Line: " + line);

            }
            book.write(outFile1);
            outFile1.close();

            Br.close();

在浏览器中看起来不错,但在移动设备(尤其是iPhone6S Plus)上,我得到了两个浮动div之间的空白:

enter image description here

1 个答案:

答案 0 :(得分:0)

要消除基于屏幕分辨率的元素之间的空间,需要使用媒体查询。可以找到here的常见屏幕分辨率,还可以找到here的媒体查询以及如何使用它们的其他信息。