Skip to content

여러 개의 태그에 같은 속성을 주려면 띄어쓰기나 쉼표로는 절대 안되나요??! #119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nowmary opened this issue Jan 11, 2018 · 2 comments
Assignees

Comments

@nowmary
Copy link

nowmary commented Jan 11, 2018

안녕하세요 !
배우는 사람보다 가르치는 사람이 훨씬 더 많이 공부하고 준비한다는 사실,,
시간과 노력 할애해 주셔서 정말 감사합니다!! 이고잉님, 조력자님들!
그리고 수업참가하는 모든 분들 함께 화이팅이예요
!!!!

질문이 있습니다 !

'h1' 이라는 태그와 'button' 이라는 태그에 같은 style 속성(글꼴 : cursive)을 주고 싶은데요,
반드시 태그별로 정의를 따로 따로 해줘야 하나요?
이고잉님께서 수업 중 강조하셨듯이,,, 중복을 없앨 수 있다면 없애고 싶어서요^^;
예를들어 h1 부터 h6까지 6개의 태그에 같은 글꼴을 적용시킨다면 style 에서 어떻게 정의하는 게 가장 깔끔한 코딩일까요?

`<style>
h1{
font-family:cursive;
}

button{
font-family:cursive;
}
</style>`

@ghdalsrldi
Copy link
Collaborator

CSS의 Selector는 다중 선택이 가능합니다
즉 h1~h6까지 같은 스타일을 적용하고 싶다면

h1, h2, h3, h4, h5, h6 {
    cont-family:cursive;
}

이런식으로 표현할 수 있어요

@nowmary
Copy link
Author

nowmary commented Jan 12, 2018

와....ghdalsrldi님 진짜 감사합니다 !!!!!
정답은 콤마였네요 +ㅁ+
heading 태그 외에도 button이나 pragraph 에도 되네요 !!! ><
이렇게 깔끔해질 수 있다니 진짜 보기좋네요 ㅎ_ㅎ
친절한 답변 감사합니다 ^
^ 많은 도움이 되었습니다!!!!!더 열공하겠습니다~!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants