Html antd按钮换行文本
使用包v3,我希望有一个固定宽度的按钮,在需要时环绕其文本和换行符,以便文本适合按钮内部,并在文本周围正确显示边框 以下是我目前尝试的内容:。我注意到使用空白:normal可以与antd一起使用,但不能与antd一起使用Html antd按钮换行文本,html,css,antd,Html,Css,Antd,使用包v3,我希望有一个固定宽度的按钮,在需要时环绕其文本和换行符,以便文本适合按钮内部,并在文本周围正确显示边框 以下是我目前尝试的内容:。我注意到使用空白:normal可以与antd一起使用,但不能与antd一起使用 const { Button } = antd; ReactDOM.render( <> <div style={{width:"100px"}}> <Button block type="pri
const { Button } = antd;
ReactDOM.render(
<>
<div style={{width:"100px"}}>
<Button block type="primary" ghost style={{whiteSpace: "normal"}}>Wrap around text</Button>
</div>
<button style={{width: '100px', whiteSpace: 'normal'}} type='primary'>Wrap around text</button>
</>,
mountNode,
);
ant btn类具有固定高度属性,您应该需要自动覆盖它,它才能工作
<Button block type="primary" ghost style={{whiteSpace: "normal",height:'auto',marginBottom:'10px'}}>Wrap around text</Button>
ant btn类具有固定高度属性,您应该需要自动覆盖它,它才能工作
<Button block type="primary" ghost style={{whiteSpace: "normal",height:'auto',marginBottom:'10px'}}>Wrap around text</Button>
妈的,解决办法总是很简单,但我永远也弄不明白!谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢!谢谢沙希德