我正在使用Docusaurus V2建立一个网站。
我有一个文件链接:
[10Studio-Sample-EN.xlsx](https://www.10studio.tech/files/10Studio-Sample-EN.xlsx)
现在,我想将该链接放在中心(传统上使用text-align: center
)。
我尝试了以下代码:
export const Center = ({children}) => (
<div
style={{
"textAlign": "center"
}}>
{children}
</div>
)
<Center>hahahaha</Center>
<Center>[10Studio-Sample-EN.xlsx](https://www.10studio.tech/files/10Studio-Sample-EN.xlsx)</Center>
它返回了这个:
有谁知道将超链接(或图像)居中的最简单方法是什么?