【发布时间】:2022-01-21 13:13:20
【问题描述】:
在下面的代码中,<br> 标签不起作用。我在 vscode 工作,正在构建 reactjs 应用程序。
function Main()
{
return(
<>
<div className="d-flex justify-content-center">
<label for="height" className="text-info bg-secondary display-6" style={{marginRight: "40px",height:"50px"}}>
Your Height:
</label>
<input type="text" id="height" placeholder="Centemeters"></input>
<br /> /*This Tag is not working*/
<label className="text-info bg-secondary display-6" for="weight">
Your Weight /*this statement is showing side by side with above ones*/
</label>
<input type="text" id="weight" placeholder="KG"></input>
</div>
</>
);
}
【问题讨论】:
标签: reactjs forms tags line-breaks