当前位置:网站首页>Some things encountered in ionic
Some things encountered in ionic
2022-07-28 17:36:00 【yoki 】
1.ionic in popover stay android The style on the is ugly ,ios The style on the is much more beautiful , I don't know why they don't use the same style , Anyway android The style on it is so ugly that his mother doesn't know it . Want to achieve and ios The same effect can be set like this .

If not, change it directly ionic Of css file , Will find popover css The position of the style , find .platform-ios .popover At the beginning css Copy all styles and overwrite them with .platform-android .popover The beginning of the file and will copy part of .platform-ios Replace with platform-android( Note that only part of the will be copied .platform-ios Switch to .platform-android, Don't change them all , Otherwise ios There is no style on it )

2.ionic in Action Sheet stay android The style in is also very strange , First, the text in the button is displayed on the left , Secondly, the Cancel button will not be displayed , And there is no dividing line between the buttons , Anyway, it's ugly , Anyone who looks at it will throw up .

The solution can be directly in buttons Medium text The Chinese writing style is as follows
$scope.show = function() { // Show the action sheet var hideSheet = $ionicActionSheet.show({ buttons: [ { text: '<div align="center"><i style="color: red" ></i> Delete </div>' }, { text: '<div align="center" ><i style="color: #4b8bf4" ></i> Cancel </div>' } ], buttonClicked: function(index) { if(index==0){ deleteObj(); } if(index==1){ hideSheet(); } return true; } }); // For example's sake, hide the sheet after two seconds $timeout(function() { hideSheet(); }, 50000); function deleteObj(){ } };The effect is as follows

But the style is still disrespectful . Now we have to fight hard , That's the point ionic Of css style . open ionic Of css File found below related css. You're welcome , Check these css Style then Ctrl+shift+?( Direct comments )


边栏推荐
- Blue Bridge Cup embedded competition resources and skills
- Wild pointer recurrence
- Random talk on test platform - platform construction ideas (Part 1)
- Talking about test platform -- Discussion on construction mode
- Encountered.Sqlite file processing during Android Development
- 谈谈你知道的发布上线(二)
- Verilog 每日一题(VL4 移位运算与乘法)
- Mqtt.fx connects to Alibaba cloud Internet of things platform
- 一文掌握 JVM 面试要点
- The practice of beego framework in goweb development: Section I Introduction to beego framework
猜你喜欢
随机推荐
网上出现的js小数计算的除法优化
Application system log structure of elastic stack
LNMP源码编译安装
AMQP protocol details
部署LAMP平台---Linux,Apache,MySQL,PHP的编译安装
Verilog 每日一题(VL4 移位运算与乘法)
Verilog daily question (vl8 uses generate... For statement to simplify code)
js将本地时间与服务器时间同步
漫谈测试平台—建设模式探讨
Wechat applet cash red packet returns the error "the IP address is not the available IP address you set on the merchant platform". The ultimate solution
Talk about the measurement of "post release problems"
C # basic interview questions (with answers)
Talk about what you know about publishing online (I)
Azure Devops developed by visual studio 2015 team
Embedded development learning path
Verilog daily question (vl26 simple stopwatch)
Random talk on test platform - platform construction ideas (Part 1)
谈谈你知道的发布上线(二)
The easy-to-use special app testing tool itest4.7.0 has been released
Selection and application of inductors in high speed circuits








