css - ReactJS 和 CSS 渲染
问题描述
所以我正在使用 React 设计一个 Web 应用程序,但我被困在这个问题上。下面给出的是正在呈现的内容
正如我使用红色矩形突出显示的那样,我的页脚组件中有一个截断区域。我不确定是什么原因造成的。CSS 和组件代码如下所示
import styled from 'styled-components';
export const Background = styled.section`
background: black`;
export const Column = styled.div`
display: flex;
flex-direction: column;
justify-content: center;
margin-right: 50px;
margin-top: 50px;`;
export const Row = styled.div`
display: flex;
flex-direction: row;
justify-content: center;`;
export const Text = styled.h1`
font-size: 1.5em;
text-align: center;
color: palevioletred;
`;
页脚组件
import React from 'react';
import { Column, Row, Background, Text } from './FooterStyles';
function Footer(props) {
return (
<div>
<Background>
<Row>
<Column>
<Text><h1>Developed By</h1></Text>
<h3>Erwin Smith</h3>
<h3>Peter Jackson</h3>
<h3>Tommy</h3>
</Column>
<Column>
<h1>About US</h1>
</Column>
</Row>
</Background>
</div>
)
}
export default Footer;
非常感谢解决此问题的解决方案。
解决方案
如果您使用引导程序,请尝试使用 margin-left,right -15px n overflow-x: hidden to body 创建一个自定义类
推荐阅读
- image - 在图像文本文档中随机生成合成噪声
- javascript - 科尔多瓦错误:无法读取未定义的属性“准备”
- google-apps-script - 无法在通过移动设备发布为 Web 电子表格中查看图像(超链接)
- iot - 部署可支持多个 PSK 身份/秘密集的 CoAP-DTLS 服务器的最佳实践是什么?
- c# - 是否可以将用 C++ 编写的插件 sdk 移植到 C# .net?
- javascript - 我的函数没有返回一个四舍五入的数字。有谁知道如何解决这一问题?
- java - 如何在 Java 8 中为每个元素流调用不同的函数?
- python - 熊猫数据框用循环创建列
- mysql - 如何横向查询显示数据?
- hive - 在 HiveQL 中使用相同的别名时结果不正确