2017-08-06 14 views
2

下のスクリーンショットからわかるように、私のピンクボタンは完全に反応しません。特定の幅以下では、サイズ変更の代わりにカットされてビューポート幅内に留まります。 問題点は何ですか? 多くのおかげブートストラップ - なぜ私のボタンは反応しませんか?

enter image description here

.btn { 
    background-color: #ff00bf; 
    border: 0 none; 
    border-radius: 25px; 
    box-shadow: 0 11px 22px rgba(34, 34, 34, 0.2); 
    color: #fff; 
    display: inline-block; 
    font-size: 1rem; 
    letter-spacing: 0.025em; 
    padding: 1.1em 2.28em 1em; 
    text-decoration: none; 
    transition: all 0.3s ease-out 0s; 
} 
.btn { 
    -moz-user-select: none; 
    background-image: none; 
    border: 1px solid transparent; 
    border-radius: 4px; 
    cursor: pointer; 
    display: inline-block; 
    font-size: 14px; 
    font-weight: normal; 
    line-height: 1.42857; 
    margin-bottom: 0; 
    padding: 6px 12px; 
    text-align: center; 
    touch-action: manipulation; 
    vertical-align: middle; 
    white-space: nowrap; 
} 

答えて

2

ホワイトスペース:nowrap属性は改行不可能になります。ただそれを削除します。また、最大幅を100%に設定します。

.btn { 
    background-color: #ff00bf; 
    border: 0 none; 
    border-radius: 25px; 
    box-shadow: 0 11px 22px rgba(34, 34, 34, 0.2); 
    color: #fff; 
    display: inline-block; 
    font-size: 1rem; 
    letter-spacing: 0.025em; 
    padding: 1.1em 2.28em 1em; 
    text-decoration: none; 
    transition: all 0.3s ease-out 0s; 
} 
.btn { 
    -moz-user-select: none; 
    background-image: none; 
    border: 1px solid transparent; 
    border-radius: 4px; 
    cursor: pointer; 
    display: inline-block; 
    font-size: 14px; 
    font-weight: normal; 
    line-height: 1.42857; 
    margin-bottom: 0; 
    padding: 6px 12px; 
    text-align: center; 
    touch-action: manipulation; 
    vertical-align: middle; 
    max-width: 100%; 
} 
+0

誠にありがとうございます! – Greg

関連する問題