我想要的效果是當寬度足夠時這樣顯示當寬度不足時這樣顯示但是現(xiàn)在遇到另一種情況如果寬度足夠不是應該水平排列嗎,不足時不是應該垂直排列嗎,怎么會出現(xiàn)這種情況代碼:html:css:.button.-green {? ? color: var(--color-snow);? ? background: var(--color-grass);}.button {? ? display: flex;? ? overflow: hidden;? ? margin: 5px;? ? padding: 8px 10px;? ? cursor: pointer;? ? -webkit-user-select: none;? ? -moz-user-select: none;? ? -ms-user-select: none;? ? user-select: none;? ? transition: all 150ms linear;? ? text-align: center;? ? white-space: nowrap;? ? text-decoration: none !important;? ? text-transform: none;? ? text-transform: capitalize;? ? color: #fff;? ? border: 0 none;? ? border-radius: 5px;? ? font-size: 13px;? ? font-weight: 500;? ? line-height: 1.3;? ? -webkit-appearance: none;? ? -moz-appearance: none;? ? appearance: none;? ? justify-content: center;? ? align-items: center;? ? flex: 0 0 160px;? ? box-shadow: 0.1px 0px 5px var(--color-smoke);}.button-container {??? ? width: 100px;? ? float: left;}
按鈕排列出現(xiàn)未對齊
maturity_process
2018-09-13 12:28:03