我正在使用react-router,这意味着我将路由存储在app.tsx文件中。
我有需要重定向到外部 url 的卡片组件onClick。
所以我的问题是如何onClick使用外部 url 示例重定向卡组件:www.test.com并为该 url 提供两个查询字符串a=xxx和b=xxx
我正在使用 Bootstrap 5,我想制作带有不同图标的头像(类似于字母头像)。所以,我需要有占位符,并且在该占位符内我需要添加图标。像代码一样:
<div width="30%" height="30%" class="bg-info rounded-circle">
<span>
{Icon here}
</span>
</div>
Run Code Online (Sandbox Code Playgroud)
但这是行不通的。谁能帮助我如何做到这一点?
我有使用 Material UI 的卡片组件。该卡在悬停时会发生变化,并且卡上也应该出现阴影。但是当我把盒子阴影放在转换之前的盒子上时,阴影就会出现,并且转换后的卡片和阴影之间有空白。我怎样才能解决这个问题?
const CardStyle = styled(Card)`
background: red;
transition: transform 50ms;
&:hover {
transform: scale(1.02) perspective(0px);
box-shadow: ${({ theme }) => theme.shadows[4]};
}
`;
Run Code Online (Sandbox Code Playgroud)
其他方式相同的输出:
:hover {
transform: scale(1.02) perspective(0px);
box-shadow: 4px 4px 4px rgba(60, 60, 93, 0.33)
}
Run Code Online (Sandbox Code Playgroud) avatar ×1
bootstrap-5 ×1
card ×1
css ×1
external-url ×1
html ×1
material-ui ×1
react-router ×1
reactjs ×1
redirect ×1
sass ×1
transform ×1
typescript ×1