<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>
<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>
<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>
<text>background-color: #ff000080</text>
<view class="common" style="background-color: #ff000080"></view>
</view>
<view style="margin-left: 30px;margin-right: 30px;">
<button type="default" @click="jumpToCheckBoxWithBackgroundColor">应用background-color示例</button>
</view>
</view>
<!-- #ifdef APP -->
</scroll-view>
<!-- #endif -->
</template>
<script setup>
const jumpToCheckBoxWithBackgroundColor = () => {
uni.navigateTo({
url:"/pages/CSS/background/background-color-check-box"
})
}
</script>
<style>
.common {
width: 250px;
height: 250px;
}
</style>