css的渐变属性如何写在内联式上
class="contenttop" :style="{ backgroundColor:linear-gradient(imgData[swiperIndex].background,#fff)}">
<view class="contenttop" :style="{ backgroundColor: 'linear-gradient('+imgData[swiperIndex].background+',#fff)'}">
重点:直连样式中,值的部分,用字符串拼接的方式去写。
<div style="background: linear-gradient(to right, red, yellow);">Hello, world!</div>