span에다가 display를 inline-block으로 width height 고정한다음에, font-size를 조절하면 span내의 글자크기만 바뀌어야하잖아?
근데 element 자체의 크기가 바뀜
const Count = styled.span`
display: inline-block;
width: 1em;
height: 1em;
background-color: black;
border-radius: 50%;
color: #fff;
text-align: center;
line-height: 1em;
margin-right: 0.3em;
font-size: 1em;
`;
font-size: 1em일 경우
const Count = styled.span`
display: inline-block;
width: 1em;
height: 1em;
background-color: black;
border-radius: 50%;
color: #fff;
text-align: center;
line-height: 1em;
margin-right: 0.3em;
font-size: 0.7em;
`;
font-size: 0.7em일경우
왜이런거임? 버근가? 킹받노
해당 댓글은 삭제되었습니다.
inline-block은 크기설정이 가능하다마...
em 공부하고 와라 em이면 텍스트 크기 영향 받음 width, height를 고정 px값 주면 안그럴꺼임