阻止换行

    1. span {
    2. white-space: nowrap;
    3. }

    取消input点击时的边框高亮

    1. :focus {
    2. outline: none;
    3. }

    给任意组件添加样式

    • 给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
    );

    1. 让元素从下往上排列
    2. ```css
    3. // 方法一
    4. display: flex;
    5. flex-direction: column;
    6. justify-content: flex-end;
    7. align-items: flex-start;
    8. // 方法二
    9. display: flex;
    10. flex-direction: column-reverse;