当前位置:网站首页>ionic 中遇到的一些东西
ionic 中遇到的一些东西
2022-07-28 16:27:00 【梁毅】
1.ionic中popover在android上的样式很丑,ios上的样式就漂亮多了,不知道他们为什么不统一用相同的样式,反正android上的样式丑到他妈都不认识了。想要达到和ios上一样的效果可以这样设置 。

如果不行就直接改ionic的css文件,将找到popover css样式的位置,找到.platform-ios .popover开头的css样式全部复制覆盖下面以.platform-android .popover开头的文件并将复制部分的.platform-ios替换成platform-android(注意只是将复制部分的.platform-ios换成.platform-android,不要全换,不然ios上面就没有样式了)

2.ionic中Action Sheet在android中的样式也很奇怪,首先按钮中的文字是靠左显示的,其次是取消按钮也不会显示,而且按钮之间也没有分割线,反正就是丑爆了,谁看谁都会吐掉。

解决方式是可以直接在buttons中的text中写样式如下
$scope.show = function() { // Show the action sheet var hideSheet = $ionicActionSheet.show({ buttons: [ { text: '<div align="center"><i style="color: red" ></i> 删除</div>' }, { text: '<div align="center" ><i style="color: #4b8bf4" ></i> 取消</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(){ } };效果如下

但是样式还是和不敬人意。现在只有来狠招了,那就是该ionic的css样式。打开ionic的css文件找到下面相关的css。不要客气,选中这些css样式然后Ctrl+shift+?(直接注释)


边栏推荐
- 【presto】presto 常用的命令
- 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
- Gray code and binary conversion and typical examples (4bits gray code counter)
- Shell脚本之免交互操作
- Verilog daily question (simple implementation of VL30 RAM)
- 掌握JVM面试专题和答案Offer拿到手软(附学习路线图)
- Visual studio 2012/2015 releases web applications together with.Cs source code
- Selection and application of inductors in high speed circuits
- Basic principle of asynchronous FIFO (simple implementation based on Verilog)
- 高速电路设计实践——概述
猜你喜欢

Verilog daily question (vl5 signal generator)

Linear algebra and matrix theory (7)

Verilog daily question (vl29 single port RAM)

高速电路中电感的选型和应用

WPF command button transparent style

mysql实现按照自定义(指定顺序)排序

Vscode uses eslint prettier to format code automatically

【kibana】问题整理 kibana 7.x No indices match pattern “apm-*“

Verilog daily question (vl14 vending machine 1 -- FSM common question types)

Goweb开发之Beego框架实战:第二节 项目初始化配置
随机推荐
Master the key points of JVM interview
Encrypt the video and upload it to OSS to achieve high concurrent access
C # traversal set
高速电路中电阻的选择
Verilog 每日一题(VL6 数据串转并电路)
Verilog 每日一题(VL29 单端口RAM)
Verilog daily question (vl27 settable counter)
The actual combat of the beego framework of goweb development: Section III program execution process analysis
Master JVM interview topics and answers offer get soft (with learning roadmap)
Mysql database addition, deletion, modification and query (detailed explanation of basic operation commands)
[impala] [error reporting solution] impala cannot read or execute the parent directory of dfs.domain.socket.path
[sqoop] sqoop 1.4.7 installation integration cdh5.13
Some attention code explanations
Selection of resistance in high speed circuit
Visual studio 2012/2015 releases web applications together with.Cs source code
线性代数及矩阵论(八)
线性代数及矩阵论(九)
高速电路中电容的选型和应用——详解
Goweb开发之Beego框架实战:第三节 程序执行流程分析
Verilog daily question (vl14 vending machine 1 -- FSM common question types)