Commit 85fa95830ad94fb71853b1e8e69c0d027259476c
1 parent
8d1157a8
图片组合的排版错位的问题修复
Showing
2 changed files
with
14 additions
and
9 deletions
components/diy_picMax/diy_picMax.wxml
... | ... | @@ -2,15 +2,15 @@ |
2 | 2 | <wxs module="g_filter" src="../diy_notice/g_filter.wxs"></wxs> |
3 | 3 | <!-- 如果有纵向合并的时候,要求要按照绝对布局来实现 --> |
4 | 4 | <block wx:if="{{is_yspan}}"> |
5 | - <view class="picMax2" style="height: {{pic_height}}rpx;" > | |
6 | - <view wx:for="{{object.data}}" class="pic_item2 width_{{item.x_span}} height_{{item.y_span}} mar_x{{item.fir.x}} mar_y{{item.fir.y}}"> | |
5 | + <view class="picMax2" style="height: {{pic_height}}rpx; font-size: 0" > | |
6 | + <view wx:for="{{object.data}}" class="pic_item2 width_{{item.x_span}} height_{{item.y_span}} mar_x{{item.fir.x}} mar_y{{item.fir.y}} mgt2"> | |
7 | 7 | <block wx:if="{{g_filter.has_char(item.wxapp_url,'plugin')>=0}}" > |
8 | 8 | <navigator url="{{item.wxapp_url}}"> |
9 | - <image src="{{item.src}}" style="display: block;" ></image> | |
9 | + <image src="{{item.src}}" style="display: block; height: 100%; width: 100%;" ></image> | |
10 | 10 | </navigator> |
11 | 11 | </block> |
12 | 12 | <block wx:else> |
13 | - <image bindtap='gopage' data-url="{{item.wxapp_url}}" src="{{item.src}}" style="display: block;" ></image> | |
13 | + <image bindtap='gopage' data-url="{{item.wxapp_url}}" src="{{item.src}}" style="display: block; height: 100%; width: 100%;"></image> | |
14 | 14 | </block> |
15 | 15 | </view> |
16 | 16 | </view> | ... | ... |
components/diy_picMax/diy_picMax.wxss
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 | .picMax-clear{clear: both;} |
14 | 14 | |
15 | 15 | .mgt2 { |
16 | - margin-top: -2rpx; | |
16 | + margin-top: -2rpx !important; | |
17 | 17 | } |
18 | 18 | |
19 | 19 | .picMax2{ |
... | ... | @@ -22,11 +22,16 @@ |
22 | 22 | .pic_item2{ |
23 | 23 | position:absolute;top:0; left:0; |
24 | 24 | } |
25 | -.pic_item2 image{} | |
25 | +.pic_item2 image{ | |
26 | + vertical-align: top; | |
27 | + vertical-align: text-top; | |
28 | + vertical-align: bottom; | |
29 | + vertical-align: text-bottom; | |
30 | +} | |
26 | 31 | /* .width_1{width: 187.5rpx}.width_2{width: 375rpx;}.width_3{width: 562.5rpx}.width_4{width:750rpx;} */ |
27 | 32 | .width_1{width: 25%}.width_2{width: 50%}.width_3{width: 75%}.width_4{width:100%} |
28 | 33 | |
29 | 34 | |
30 | -.height_1{height: 187.5rpx;}.height_2{height: 375rpx;}.height_3{height: 562.5rpx}.height_4{height: 748rpx;} | |
31 | -.mar_x1{margin-left:187.5rpx;}.mar_x2{margin-left:375rpx;}.mar_x3{margin-left:562.5rpx}.mar_x4{margin-left: 748rpx;} | |
32 | -.mar_y1{margin-top: 187.5rpx;}.mar_y2{margin-top: 375rpx;}.mar_y3{margin-top: 562.5rpx}.mar_y4{margin-top: 748rpx;} | |
33 | 35 | \ No newline at end of file |
36 | +.height_1{height: 186rpx;}.height_2{height: 372rpx;}.height_3{height: 558rpx}.height_4{height: 744rpx;} | |
37 | +.mar_x1{left:187rpx;}.mar_x2{left:374rpx;}.mar_x3{left:561rpx}.mar_x4{left: 748rpx;} | |
38 | +.mar_y1{top: 186rpx;}.mar_y2{top: 372rpx;}.mar_y3{top: 558rpx}.mar_y4{top: 744rpx;} | |
34 | 39 | \ No newline at end of file | ... | ... |