2017-08-06 61 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

相關問題