javascript - 为什么我的打字组件没有垂直对齐?
问题描述
我正在制作一个网站投资组合,我一直在使用这个代码片段来输入:
const TypingParagraph = styled.span`
font-family: "Times New Roman";
margin-left: 6rem;
color: white
&::before {
content: '_';
color: transparent
}
&::after {
content: '_';
display: inline_flex;
animation: ${rotate} 0.7s linear infinite;
}
`;
但由于某种原因,它并没有与其父组件垂直对齐。它看起来像 这样:
此外,改变字体大小也会改变边距也很奇怪。
对此的任何帮助将不胜感激,谢谢!
解决方案
推荐阅读
- perl - 如何访问 vmware sdk 中的 CreateNasDatastore?
- c - 如何将 argc 和 argv 分配给全局变量?
- java - 如何使用java将数据存储到Access数据库中
- redis - 如何将一些键值对传递给redis zadd?
- r - 如何在 R 中绘制堆叠排序的带状图
- python - 如何配置ctags更好的选择光标下标签的定义文件
- javascript - DB2 .prepare() 函数如何在 Node 中工作?
- vue.js - 在 vue.js 中分别导入组件和 css
- python - 熊猫(python)中的错误,'KeyError:'temp''?
- r - 导入带有逗号的未引用字符串的 csv;对于每一行 - 忽略每第三个逗号开始?