当前位置:网站首页>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+?(直接注释)


边栏推荐
- Visual studio 2012/2015 releases web applications together with.Cs source code
- Verilog 每日一题 (VL27 可置位计数器)
- Verilog 每日一题(VL4 移位运算与乘法)
- Batch download files
- Verilog daily question (vl24 multi bit MUX synchronizer cross time domain output)
- 利用SQL Server代理作业对数据库进行定时还原
- [kibana] problem sorting kibana 7.x no indices match pattern "APM-*“
- [atlas] atlas compilation error sorting (all)
- 线性代数及矩阵论(八)
- Goweb开发之Iris框架实战:项目总结与回顾
猜你喜欢

Redis source code analysis, hold it hard, and code it quickly

异步FIFO基本原理(基于Verilog的简单实现)

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

我为什么选择使用Go语言?

Verilog 每日一题 (VL28 加减计数器)

Basic principle of asynchronous FIFO (simple implementation based on Verilog)

Analysis of kubernetes service principle

高速电路中电阻的选择

Verilog daily question (vl5 signal generator)

线性代数及矩阵论(七)
随机推荐
influxdb2的使用
高速电路中电阻的选择
Shell脚本之免交互操作
部分情况下Error:(xx, xx) Failed to resolve: xxxxxx解决。
Self study examination in April 2021
[kibana] problem sorting kibana 7.x no indices match pattern "APM-*“
With a total data volume of more than trillions of lines, Yuxi cigarette factory can easily deal with it by correctly selecting the timing database
Selection of resistance in high speed circuit
LNMP source code compilation and installation
MySQL implements sorting according to custom (specified order)
Verilog daily question (vl5 signal generator)
连接设计与测试平台——SystemVerilog 接口知识点总结
技术面轻松通过,HR:只有三年大厂经验的不值20K
QR code generation of wechat applet with parameters
AMQP协议详解
Shell脚本之AWK
Vscode界面介绍
Verilog 每日一题(VL26 简易秒表)
【kibana】问题整理 kibana 7.x No indices match pattern “apm-*“
Goweb开发之Beego框架实战:第四节 数据库配置及连接