Web/css
invalid property value background color
rockettttman
2020. 11. 25. 22:14
1. div에 background-colr 적용 시 에러가 나는 경우
const HeaderStyle = styled.div`
height : 45px;
background-color : blue;
&:hover {
background : black;
}
`;
아래와 같이 blue를 색상코드로 변경해주니 적용이 잘 된다.
background-color : #0100FF;
2. calc 함수를 사용하는 경우
- calc() 내부의 계산식에서 연산자 앞뒤를 붙여쓰면 발생하는 오류
//변경 전
width : calc(100%-45px);
//변경 후
width : calc(100% - 45px);