提交 c3773f85 编写于 作者: shutao-dc's avatar shutao-dc

update background-image.uvue

上级 599ba667
<template> <template>
<view style="flex-grow: 1;"> <scroll-view>
<view> <view>
<text>不支持背景图片,仅支持linear-gradient方法</text> <text>不支持背景图片,仅支持linear-gradient方法</text>
<text>background-image: linear-gradient(to right, red, yellow)</text> <view v-for="(direction) in directionData">
<view class="common" style="background-image: linear-gradient(to right, red, yellow);"></view> <text>background-image: linear-gradient({{direction}}, red, yellow)</text>
<view class="common" :style="{'background-image': 'linear-gradient('+direction+', red, yellow)'}"></view>
</view>
</view> </view>
</view> </scroll-view>
</template> </template>
<script> <script>
export default {
data(){
return {
directionData: ['to right', 'to left', 'to bottom', 'to top', 'to bottom left', 'to bottom right', 'to top left', 'to top right']
}
}
}
</script> </script>
<style> <style>
...@@ -17,4 +25,4 @@ ...@@ -17,4 +25,4 @@
width: 500rpx; width: 500rpx;
height: 500rpx; height: 500rpx;
} }
</style> </style>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册