html span从上往下,从左往右排序

<html> 
<head> 
<meta charset="utf-8"/> 
<title>从上往下,从左往右title> 
<style> 
    #flex-container {flex-flow:column wrap; } 

    #flex-container > :nth-child(4n - 2) { order: 1; }
    #flex-container > :nth-child(4n - 1) { order: 2; }
    #flex-container > :nth-child(4n - 0) { order: 3; }
    #flex-container > :nth-child(-n + 4) {
        page-break-before: always; /* Old syntax */
        break-before: always;  /* New syntax */
        border-top: 1px solid;
    }
style> 
head> 
<body> 

<div id="flex-container">
  <span>1span>
  <span>2span>
  <span>3span>
  <span>4span>
  <span>5span>
  <span>6span>
  <span>7span>
  <span>8span>
  <span>9span>
  <span>10span>
div>

body> 
html> 

 

你可能感兴趣的:(html span从上往下,从左往右排序)