源码如下wxml:
<!--pages/test/test.wxml-->
<
view
class=
'one'
>
<
button
class=
'btn1'
style=
'width:270rpx;height:270rpx'><
text
>\n家装案例
</
text
></
button
>
</
view
>
<
view
class=
'line'>
</
view
>
<
view
class=
'one'
>
<
button
class=
'btn1'
style=
'width:270rpx;height:270rpx'><
text
>\n工程案例
</
text
></
button
>
</
view
>
/* pages/test/test.wxss */
.one{
display:
flex;
background-image:
url(
"https://mmbiz.qpic.cn/mmbiz_png/8NCVRQmNLueKSb8fSmmGFF0Ge1tvwGr9DXJCsl51Q0DaCyPBQzdhYKE6LkqEgaTc8jicvoSicbrI8vPP6dBVmtqA/0?wx_fmt=png");
background-size:
cover;
opacity:
0.8;
height:
550
rpx
}
.btn1{
border-radius:
150
rpx;
background-color:
salmon;
margin-top:
130
rpx;
}
.btn1
text{
font-size:
35
rpx
}
.btn1:active{
color:
blue;
background-color:
red
}
.line{
border:
double
1px
black
}