2016-08-16 6 views
1

これはionic2よりも多くのCSSの質問です。どのように小さなボタンを持っているかcss

私は、CSSを使用してすべてのボタンを小さくしたいと思います。ここにはPlunkerの例があります。可能であれば、それは応答性がありますか?上書きするためにあなたのCSSでこれを追加segment-button

.segment-button { 
    border-style: none; 
    border-color: #e62100; 
    color: #e62100; 
    border-width: thin; 
    font-size: 12px; 
} 

答えて

0

のもと.ion-content

enter image description here

そのに従ってリサイズ:あなただけの幅と高さを変更する必要が

.segment-button:not(:first-of-type) { 
    max-width: 30px; 
    line-height: 30px; 
    height:30px; 
} 
+0

感謝:) @keithがコンテナのサイズを変更せずにそれを行うことが可能ですか?ボタンはまだ幅を埋める必要がありますページ – LeRoy

1

を(とmax-width/max-height、およびline-heightを調整します)。.segment-button: first-of-type.segment-button:not(:first-of-type),.segment-button:last-of-type,.md .segment-button。このような

何か:

.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; 
} 
+0

ありがとう@ラファエルRNそれは容器のサイズを変更せずに行うことは可能ですか? – LeRoy

+0

@LeRoyはい、 'ion-segment'要素にスタイルを追加し、' .days-segments'のようなクラスを追加するよう指定します –

関連する問題