首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使用更小的按钮css

如何使用更小的按钮css
EN

Stack Overflow用户
提问于 2016-08-16 21:22:09
回答 2查看 3.4K关注 0票数 3

这是一个比ionic2更复杂的问题。

我想让所有的按钮使用css更小。下面是一个Plunker示例。如果可能的话,它能响应吗?根据.ion-content调整大小

基于segment-button的智能交通系统

代码语言:javascript
复制
.segment-button {
    border-style: none;
    border-color: #e62100;
    color: #e62100;
    border-width: thin;
    font-size: 12px;
}
EN

回答 2

Stack Overflow用户

发布于 2016-08-16 21:33:15

您只需在style.css中更改代码的宽度和高度(以及最大宽度/最大高度,并调整行高),即可更改.segment-button: first-of-type.segment-button:not(:first-of-type).segment-button:last-of-type.md .segment-button

如下所示:

代码语言:javascript
复制
.md .segment-button {
  border-style: none;
  border-color: #e62100;
  color: #e62100;
  border-width: thin;
  font-size: 12px;
}

.segment-button:first-of-type {
  width: 40px;
  height: 38px;
  border-radius: 50%;
  font-size: 15px;
  line-height: 40px;
  max-width: 40px;
  max-height: 40px;
}

.segment-button:not(:first-of-type) {
  width: 40px;
  height: 38px;
  border-radius: 50%;
  font-size: 15px;
  line-height: 40px;
  max-width: 40px;
  max-height: 40px;
}

.segment-button:last-of-type {
  width: 40px;
  height: 38px;
  border-radius: 50%;
  font-size: 15px;
  line-height: 40px;
  max-width: 40px;
  max-height: 40px;
}
票数 4
EN

Stack Overflow用户

发布于 2016-08-16 21:30:33

将此内容添加到css中以覆盖:

代码语言:javascript
复制
.segment-button:not(:first-of-type) {
   max-width: 30px;
   line-height: 30px;
   height:30px;
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38976145

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档