font-weight가 적용이 안 되는데 어떻게 하나요?
1181
投稿した質問数 3
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>회사 웹 페이지 만들기</title>
<style>
body{
font-weight: 30px;
}
img{
display: flex;
float: left;
width: 130px;
height: 30px;
margin: 10px 0px 0px 8px;
}
img:hover{
cursor: pointer;
}
img, .menu_bar{
margin-right: 50px;
}
.menu_bar{
width: 100%;
height: 70px;
border: 2px solid black;
text-align: center;
display: flex;
float: left;
}
input{
width: 110px;
height: 45px;
margin-right: 10px;
margin-top: 12px;
background-color: white;
font-family: "돋움";
font-size: 15px;
border: none;
border-radius: 5px;
}
input:hover{
background-color: #f8f9fa;
cursor: pointer;
}
#event, #freeStart{
width: 170px;
}
#freeStart{
color: white;
background-color: #ff6464;
}
#freeStart:hover{
background-color: #DB4455;
}
#login{
margin-left: 100px;
}
div > #seeMore{
width: 20px;
height: 20px;
padding: 12px;
}
#seeMore:hover{
background-color: #f8f9fa;
}
</style>
</head>
<body>
<div class="menu_bar">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/1b/NHN_COMMERCE_CI.png/1600px-NHN_COMMERCE_CI.png" alt="회사로고">
<input type="button" name="쇼핑물" id="shop" value="쇼핑몰">
<input type="button" name="스토어" id="store" value="스토어">
<input type="button" name="마케팅" id="marketing" value="마케팅">
<input type="button" name="고객지원" id="customer" value="고객지원">
<input type="button" name="이벤트" id="event" value="혜택 ● 이벤트">
<input type="button" name="엔터프라이즈" id="enterprise" value="엔터프라이즈">
<input type="button" name="이전센터" id="center" value="이전센터">
<input type="button" name="로그인" id="login" value="로그인">
<input type="button" name="무료로 시작하기" id="freeStart" value="무료로 시작하기">
<img src="/image/메뉴바.png" id="seeMore" alt="">
</div>
</body>
</html>
回答 1
1
안녕하세요, 인프런 AI 인턴입니다.
님의 CSS 코드에서 font-weight 속성이 제대로 적용되지 않는 문제는 font-weight 속성에 잘못된 값이 할당되었기 때문입니다. font-weight 속성은 글꼴의 두께를 지정하는 속성으로, 픽셀(px) 단위가 아니라 normal, bold, bolder, lighter, 또는 100부터 900까지의 숫자를 사용하여 글꼴 두께를 지정합니다.
올바른 사용 예는 다음과 같습니다:
body{
font-weight: bold;
}
또는 숫자값을 사용하여 지정할 수 있습니다:
body{
font-weight: 400; /* Normal weight */
}
30px 대신 font-weight의 올바른 값을 사용하여 수정해 보시길 바랍니다.
수업자료 문의
0
7
1
part3. spy 쪽 / part3,part4 강의자료
0
33
2
최종 코드
0
40
2
Open AI 결제
0
40
2
figma 파일을 받을 수가 없어요
0
48
1
다운로드 연결이 되지 않을 때는 어떻게 해야할까요?
0
37
1
Visual Studio Code 대신 Pycharm 써도 되나요?
0
42
2
커서, 클로드, 피그마는 모두 유료버전을 사용해야하나요?
0
57
1
구글 서치콘솔 도메인 소유권 확인 실패
0
40
2
antigravity로 하던 작업 이제 visual code로 하면 되는 거죠?
0
59
1
다음 강의 얼른 올려주세요
0
44
2
일반 강의와 차이점?
1
53
1
중요하진 않지만 설명하신부분에서 안된부분..
1
37
1
안녕하세요, 강좌 5의 피그마 파일은 어디서 볼 수 있나요?
0
66
2
stopPropagation()에 대해서 질문 있습니다.
0
50
2
뉴스페이퍼 싱글템플릿 모바일 화면 디자인 질문
0
41
2
노션에 20.Contact가 없어요
0
47
2
검색엔진 차단 noindex
0
51
2
파트9 강의는 언제 오픈하시나요
0
51
2
ZIP 파일
0
55
2
블로그 올려도 될까요?
1
472
1
input 인라인요소 너비 조정에 대해
3
618
1
#9 박스모델 4편 background 질문입니다
1
269
1
size 단축속성 적용하기
0
233
0

