老师,你好,我在调试程序时,对于图片模糊效果,在电脑软件中显示是正常的(图一),但在手机上显示的时候(图二),图片下边没有明显的边界线,看起来效果不好,请问这个可能是什么原因造成的?谢谢!
1 2 3 4 5 6 7 8 9 10 11 | < import src = "/wxParse/wxParse.wxml" /> < view class = "container" > < image class = "head-img" src = "{{appServer}}{{channel.thumbnail}}" mode = "aspectFill" ></ image > < view class = "head-img-hover" > < text class = "main-title" >{{channel.text}}</ text > < text class = "sub-title" >{{channel.description}}</ text > </ view > < view class = "detail" > < template is = "wxParse" data = "{{wxParseData:content.nodes}}" /> </ view > </ view > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | .container { display : flex; flex- direction : column; } .head-img { width : 100% ; height : 320 rpx; -webkit-filter: blur( 20px ); filter: blur( 20px ); } .head-img-hover { width : 100% ; height : 320 rpx; position : absolute ; top : 0 ; left : 0 ; display : flex; flex- direction : column; } .main-title { font-size : 19px ; color : #fff ; font-weight : bold ; margin-top : 50 rpx; margin-left : 40 rpx; letter-spacing : 2px ; } .sub-title { font-size : 28 rpx; color : #fff ; margin-left : 40 rpx; margin-top : 30 rpx; } .detail { color : #666 ; margin-left : 10 rpx; margin-top : 20 rpx; margin-bottom : 20 rpx; margin-right : 10 rpx; line-height : 44 rpx; letter-spacing : 2px ; } |
图一(开发工具上):
图二(手机上):
4年同步微信官方迭代,累计20000+人学习, 比微信官方更火爆!
了解课程