Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
273 views
in Technique[技术] by (71.8m points)

reactjs - Assigning CSS at individual level

How to place "SUCCESS" button in the next line aligned to the left. And how do i assign CSS properties at individual ReactSearchBox and Button tag .Below is the image of my app

My App

function NavBarComponent() {
    
 return (
        <div  className="name-input-css">
            <ReactSearchBox  className="name-css" // this CSS is not working
                placeholder="Name"
                value="Name"
                data={"A"}
                callback={record => console.log(record)}
                inputBoxHeight="30px"
            />

            <ReactSearchBox 
                placeholder="Placeholder"
                value="Age"
                data={100}
                callback={record => console.log(record)}
                inputBoxHeight="30px"
            />
            
            <Button variant="success">Success</Button>{' '}


        </div>
    );
}

Below is the CSS file

.name-input-css{
    display: flex;
    /* vertical | horizontal */
     margin: 5% auto;
}

.name-css{
    order: 2;
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...