阻止换行
span {
white-space: nowrap;
}
取消input点击时的边框高亮
:focus {
outline: none;
}
给任意组件添加样式
- 给props传一个className
- 子组件使用className
- 使用styled(xxx)定义新组件 ```jsx // This could be react-router-dom’s Link for example const Link = ({ className, children }) => ( {children} );
const StyledLink = styled(Link)color: palevioletred;
font-weight: bold;
;
render(
Unstyled, boring Link
Styled, exciting Link
);
让元素从下往上排列
```css
// 方法一
display: flex;
flex-direction: column;
justify-content: flex-end;
align-items: flex-start;
// 方法二
display: flex;
flex-direction: column-reverse;