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

      <view>
        <text>background-color: #ff0000</text>
        <view class="common" style="background-color: #ff0000"></view>
      </view>

      <view>
        <text>background-color: #f00</text>
        <view class="common" style="background-color: #f00"></view>
      </view>
20 21 22 23 24 25 26 27 28 29

      <view>
        <text>background-color: #ff000080</text>
        <view class="common" style="background-color: #ff000080"></view>
      </view>

      <view>
        <text>background-color: #f008</text>
        <view class="common" style="background-color: #f008"></view>
      </view>
DCloud-WZF's avatar
DCloud-WZF 已提交
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50

      <view>
        <text>background-color: rgb(255, 0, 0)</text>
        <view class="common" style="background-color: rgb(255, 0, 0)"></view>
      </view>

      <view>
        <text>background-color: rgba(255, 0, 0, 0.5)</text>
        <view class="common" style="background-color: rgba(255, 0, 0, 0.5)"></view>
      </view>
    </view>
  <!-- #ifdef APP -->
  </scroll-view>
  <!-- #endif -->
</template>

<style>
  .common {
    width: 250px;
    height: 250px;
  }
DCloud-WZF's avatar
DCloud-WZF 已提交
51
</style>