ionic2更改android下actionsheet样式为ios的actionsheet样式

注释或者删除main.css中的以下代码

.action-sheet-md .action-sheet-container {
  padding: .8rem 0;
  background: #fafafa;
}

.action-sheet-md .action-sheet-title {
  padding: 11px 16px 17px;
  font-size: 1.6rem;
  text-align: left;
  color: #757575;
}

.action-sheet-md .action-sheet-button {
  position: relative;
  overflow: hidden;
  padding: 0 16px;
  min-height: 4.8rem;
  font-size: 1.6rem;
  text-align: left;
  color: #222;
  background: transparent;
}

.action-sheet-md .action-sheet-button.activated {
  background: #f1f1f1;
}

.action-sheet-md .action-sheet-icon {
  margin: 0 32px 0 0;
  padding: 0;
  width: 2.3rem;
  font-size: 2.4rem;
  text-align: center;
  vertical-align: middle;
}

.action-sheet-md .action-sheet-group {
  overflow: hidden;
}

.action-sheet-md .action-sheet-group .button-inner {
  -webkit-justify-content: flex-start;
  -ms-flex-pack: start;
  justify-content: flex-start;
}

.action-sheet-md .action-sheet-selected {
  font-weight: bold;
}

然后添加以下代码到main.css中

.action-sheet-md {
  text-align: center;
}

.action-sheet-md .action-sheet-container {
  padding: 0 10px;
}

.action-sheet-md .action-sheet-group {
  overflow: hidden;
  margin-bottom: 8px;
  border-radius: 13px;
  background: #f9f9f9;
}

.action-sheet-md .action-sheet-group:last-child {
  margin-bottom: 10px;
}

.action-sheet-md .action-sheet-title {
  padding: 1.5rem;
  border-bottom: 0.55px solid #d6d6da;
  border-radius: 0;
  font-size: 1.3rem;
  font-weight: 400;
  text-align: center;
  color: #8f8f8f;
}

.action-sheet-md .action-sheet-button {
  margin: 0;
  padding: 18px;
  min-height: 5.6rem;
  border-bottom: 0.55px solid #d6d6da;
  font-size: 2rem;
  color: #007aff;
  background: transparent;
}

.action-sheet-md .action-sheet-button:last-child {
  border-bottom: 0;
}

.action-sheet-md .action-sheet-button.activated {
  margin-top: -0.55px;
  border-top: 0.55px solid #ebebeb;
  border-bottom-color: #ebebeb;
  background: #ebebeb;
}

.action-sheet-md .action-sheet-selected {
  font-weight: bold;
  background: #fff;
}

.action-sheet-md .action-sheet-destructive {
  color: #f53d3d;
}

.action-sheet-md .action-sheet-cancel {
  font-weight: 600;
  background: #fff;
}
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值