flex-direction.uvue 2.1 KB
Newer Older
DCloud-yinjiacheng's avatar
DCloud-yinjiacheng 已提交
1
<template>
DCloud-WZF's avatar
DCloud-WZF 已提交
2 3 4 5 6 7 8 9
  <!-- #ifdef APP -->
  <scroll-view style="flex: 1">
    <!-- #endif -->
    <view style="flex-grow: 1">
      <view>
        <text>flex-direction: row</text>
        <view class="common" style="flex-direction: row">
          <view
DCloud-yinjiacheng's avatar
DCloud-yinjiacheng 已提交
10
            style="width: 50px; height: 50px; background-color: red"
DCloud-WZF's avatar
DCloud-WZF 已提交
11 12
          ></view>
          <view
DCloud-yinjiacheng's avatar
DCloud-yinjiacheng 已提交
13
            style="width: 50px; height: 50px; background-color: green"
DCloud-WZF's avatar
DCloud-WZF 已提交
14 15
          ></view>
          <view
DCloud-yinjiacheng's avatar
DCloud-yinjiacheng 已提交
16
            style="width: 50px; height: 50px; background-color: blue"
DCloud-WZF's avatar
DCloud-WZF 已提交
17 18 19
          ></view>
        </view>
      </view>
DCloud-yinjiacheng's avatar
DCloud-yinjiacheng 已提交
20

DCloud-WZF's avatar
DCloud-WZF 已提交
21 22 23 24
      <view>
        <text>flex-direction: row-reverse</text>
        <view class="common" style="flex-direction: row-reverse">
          <view
DCloud-yinjiacheng's avatar
DCloud-yinjiacheng 已提交
25
            style="width: 50px; height: 50px; background-color: red"
DCloud-WZF's avatar
DCloud-WZF 已提交
26 27
          ></view>
          <view
DCloud-yinjiacheng's avatar
DCloud-yinjiacheng 已提交
28
            style="width: 50px; height: 50px; background-color: green"
DCloud-WZF's avatar
DCloud-WZF 已提交
29 30
          ></view>
          <view
DCloud-yinjiacheng's avatar
DCloud-yinjiacheng 已提交
31
            style="width: 50px; height: 50px; background-color: blue"
DCloud-WZF's avatar
DCloud-WZF 已提交
32 33 34
          ></view>
        </view>
      </view>
DCloud-yinjiacheng's avatar
DCloud-yinjiacheng 已提交
35

DCloud-WZF's avatar
DCloud-WZF 已提交
36 37 38 39
      <view>
        <text>flex-direction: column</text>
        <view class="common" style="flex-direction: column">
          <view
DCloud-yinjiacheng's avatar
DCloud-yinjiacheng 已提交
40
            style="width: 50px; height: 50px; background-color: red"
DCloud-WZF's avatar
DCloud-WZF 已提交
41 42
          ></view>
          <view
DCloud-yinjiacheng's avatar
DCloud-yinjiacheng 已提交
43
            style="width: 50px; height: 50px; background-color: green"
DCloud-WZF's avatar
DCloud-WZF 已提交
44 45
          ></view>
          <view
DCloud-yinjiacheng's avatar
DCloud-yinjiacheng 已提交
46
            style="width: 50px; height: 50px; background-color: blue"
DCloud-WZF's avatar
DCloud-WZF 已提交
47 48 49
          ></view>
        </view>
      </view>
DCloud-yinjiacheng's avatar
DCloud-yinjiacheng 已提交
50

DCloud-WZF's avatar
DCloud-WZF 已提交
51 52 53 54
      <view>
        <text>flex-direction: column-reverse</text>
        <view class="common" style="flex-direction: column-reverse">
          <view
DCloud-yinjiacheng's avatar
DCloud-yinjiacheng 已提交
55
            style="width: 50px; height: 50px; background-color: red"
DCloud-WZF's avatar
DCloud-WZF 已提交
56 57
          ></view>
          <view
DCloud-yinjiacheng's avatar
DCloud-yinjiacheng 已提交
58
            style="width: 50px; height: 50px; background-color: green"
DCloud-WZF's avatar
DCloud-WZF 已提交
59 60
          ></view>
          <view
DCloud-yinjiacheng's avatar
DCloud-yinjiacheng 已提交
61
            style="width: 50px; height: 50px; background-color: blue"
DCloud-WZF's avatar
DCloud-WZF 已提交
62 63 64 65 66 67 68
          ></view>
        </view>
      </view>
    </view>
    <!-- #ifdef APP -->
  </scroll-view>
  <!-- #endif -->
DCloud-yinjiacheng's avatar
DCloud-yinjiacheng 已提交
69 70 71
</template>

<style>
DCloud-WZF's avatar
DCloud-WZF 已提交
72
.common {
DCloud-yinjiacheng's avatar
DCloud-yinjiacheng 已提交
73 74
  width: 250px;
  height: 250px;
DCloud-WZF's avatar
DCloud-WZF 已提交
75 76 77
  background-color: gray;
}
</style>