2一、iphone x 底部固定按鈕適配html
主要就是安全區的兼容。 1、mainfest.json 文件 app-plus 節點下配下 safearea "safearea": { "bottom": { "offset": "none" } } 2、添加安全區元素 .safe-reg { padding-bottom: constant(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom); } 如: <view class="footer-region footer-region-fixed"> <view class="click-reg"> <text>我已閱讀並贊成該協議</text> </view> <view class="safe-reg"></view> </view>
https://ask.dcloud.net.cn/article/35564
2二、1px 適配問題
ui說 默認的1px 過寬;ios
.border-b:after { position: absolute; content: ''; width: 100%; left: 0; bottom: 0; height: 1px; background-color: #e3e5e9; -webkit-transform: scale(1, 0.5); transform: scale(1, 0.5); -webkit-transform-origin: center bottom; transform-origin: center bottom; }
2三、picker組件 修改樣式
微信小程序暫不支持修改。只能使用 picker-view
https://ext.dcloud.net.cn/plugin?id=273
2四、swiper組件滑動圓角;
ios上是直角,須要的是圓角。
解決;
外層套一個view,設置樣式
border-radius: 10rpx;
transform: translateY(0);
overflow:hidden; /* 讓照片循環的時候不變成直角 */
2五、web-view
web-view 是一個 web 瀏覽器組件,能夠用來承載網頁的容器,會自動鋪滿整個頁面。
https://www.cnblogs.com/Glant/p/11217270.html
2六、ios bug
場景:
兩個tab頁面,這裏叫首頁與我的中心。用到了 store的state屬性。經過 state的 hasLogin 來同時控制 倆頁的 元素顯示。當在首頁 改變 hasLogin值時,首頁 顯示正常;我的中心頁 也獲得了通知,但出現 本地靜態圖片 未加載的bug。我的中心頁,操做改變時,此bug在首頁出現。
解決方式:
經過import 導入這些靜態圖片,而後 綁定到image標籤。
2七、image 經常使用樣式
設定寬度,高度自動,不變形
mode="widthFix" style="width: 100%;"web