這是我的代碼 我決定背景色:#f1f5ff 和顏色(font-color):# 181818;
我認(rèn)為它的對(duì)比度是好的,但仍然出現(xiàn)錯(cuò)誤
我看不到文本..
有什么問(wèn)題..T.T
我也嘗試了顏色-& gt;字體顏色
但結(jié)果是同樣的錯(cuò)誤
幾天前我看到了這個(gè)錯(cuò)誤,但是直到現(xiàn)在我也無(wú)法解決..
請(qǐng)幫助我
import React from 'react';
import styled, { keyframes } from 'styled-components';
//import CompanyAdvantages from '../Sample/CompanyAdvantages';
export default function SecondArea() {
return (
<Container>
<Row1>
<TextContainer>
<Text1>???? ??? ?? ?? ???</Text1>
<Text2>
?? ?? ??? ?? ???? ???? ?? C2Mt??? ??????
</Text2>
</TextContainer>
</Row1>
</Container>
);
}
const Container = styled.section`
width: 100vw;
height: 560px;
position: relative;
background-color: #f1f5ff;
color: #181818;
font-size: 12px;
line-height: 20px;
font-family: GmarketSansTTFMedium;
`;
const Row1 = styled.div`
display: flex;
flex-grow: 1;
position: absolute;
top: 35%;
flex-direction: column;
`;
const TextContainer = styled.div`
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
width: fit-content;
height: fit-content;
line-height: 52px;
font-size: 48px;
opacity: 0;
`;
const Text1 = styled.div`
font-weight: 300;
text-align: left;
`;
const Text2 = styled.div`
font-weight: bold;
text-align: left;
`;
在TextContainer樣式的組件中,您設(shè)置了不透明度:0。在父組件上設(shè)置不透明度也會(huì)影響其子組件。移除它,您將能夠看到文本。