App下載
首頁htmlflex_directionCSS Property Value - 如何flex-direction: row-reverse; 通過更改分辨率更改li順序

CSS Property Value - 如何flex-direction: row-reverse; 通過更改分辨率更改li順序

我們想知道如何flex-direction: row-reverse; 通過更改分辨率更改li順序。

<!DOCTYPE html>
<html>
<head>
<style>
ul {
  display: flex;
}

li {
  flex: 0 0 40px;
}

@media ( max-width : 1000px) {
  ul {
    flex-direction: row-reverse;
    justify-content: flex-end;
  }
}
</style>
</head>
<body>
  <ul>
    <li>1</li>
    <li>2</li>
    <li>3</li>
    <li>4</li>
    <li>5</li>
    <li>6</li>
    <li>7</li>
    <li>8</li>
    <li>9</li>
    <li>10</li>
  </ul>
</body>
</html>