久久久久av_欧美日韩一区二区在线_国产精品三区四区_日韩中字在线

返回列表 發帖
查看: 5034|回復: 2

discuz手機版詳情頁,圖片自動固定大小,怎么修改?

9

主題

36

回帖

170

積分

漸入佳境

貢獻
0 點
金幣
115 個
樓主
發表于 2019-7-11 19:41:04 | 只看樓主 |只看大圖 |倒序瀏覽 |閱讀模式


discuz手機版詳情頁,圖片自動固定大小,怎么修改?默認不能全屏,固定了尺寸,可是我在源碼里面,搜索不到這個數值。
回復

使用道具 舉報

17

主題

77

回帖

156

積分

漸入佳境

貢獻
1 點
金幣
50 個
沙發
發表于 2019-7-11 20:48:04 | 只看Ta
觸屏版圖片尺寸設置,打開\template\default\touch\forum\discuzcode.htm文件,找

  1. $fix = count($post[imagelist]) == 1 ? 140 : 83;
復制代碼
改為
  1. $fix = count($post[imagelist]) == 1 ? 650 : 800;
復制代碼
也就是把140的小圖改為寬650高800這樣,差不多是最大屏幕的手機的實際尺寸。這里建議電腦版的圖片上傳時就設置最大寬度不超過700,不然加載速度會很慢。然后再找
  1. $mobilethumburl = $attach['attachimg'] && $_G['setting']['showimages'] && (!$attach['price'] || $attach['payed']) && ($_G['group']['allowgetimage'] || $_G['uid'] == $attach['uid']) ? getforumimg($attach['aid'], 0, 140, 140, 'fixnone') : '' ;
復制代碼
改為
  1. $mobilethumburl = $attach['attachimg'] && $_G['setting']['showimages'] && (!$attach['price'] || $attach['payed']) && ($_G['group']['allowgetimage'] || $_G['uid'] == $attach['uid']) ? getforumimg($attach['aid'], 0, 650, 800, 'fixnone') : '' ;
復制代碼


CSS設置,打開\static\image\mobile\style.css,找

  1. .plc .pi .message img,.plc .pi .img_one img { margin:0px 4px 0px 0; max-width:140px; max-height:140px; }
復制代碼

改為

  1. .plc .pi .message img,.plc .pi .img_one img {max-width:98%; display:block;vertical-align: middle;margin-bottom:4px;}
復制代碼

CSS也限制了高和寬,改為按屏幕尺寸的百分比來顯示。為了不撐破,別搞100%了,98%就足夠了。

回復 1

使用道具 舉報

2

主題

93

回帖

121

積分

漸入佳境

貢獻
0 點
金幣
14 個
板凳
發表于 2019-7-13 10:03:11 | 只看Ta
建筑資源吧 發表于 2019-7-11 20:48
觸屏版圖片尺寸設置,打開\template\default\touch\forum\discuzcode.htm文件,找

改為

贊一個!
回復

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規則

  • 關注公眾號
  • 有償服務微信
  • 有償服務QQ

手機版|小黑屋|Discuz! 官方交流社區 ( 皖ICP備16010102號 |皖公網安備34010302002376號 )|網站地圖|star

GMT+8, 2025-7-2 03:54 , Processed in 0.062386 second(s), 13 queries , Redis On.

Powered by Discuz! W1.0 Licensed

Cpoyright © 2001-2025 Discuz! Team.

關燈 在本版發帖
有償服務QQ
有償服務微信
返回頂部
快速回復 返回頂部 返回列表