Home 게시판 커뮤니티 Q&A class 상속 문제

1개 답변, 2 voices Last updated by Avatar of Matthew ParkMatthew Park 9 years, 6 months 전
  • Avatar of sehobangsehobang
    Participant
    @sehobang
    #29995

    상위 div가 있습니다.

    그리고 그 하위 항목들이 있습니다.

     

    상위 div을 시작할 때 class속성을 부여하면

    하위 항목들도 그 속성을 상속받잖습니까?

     

    그런데 특정 항목에서는 그 class속성을 무시를 하려면 어떤 방법을 써야 하나요?

    Avatar of Matthew ParkMatthew Park
    Moderator
    @hackya
    #29997

    .parent > .child

    로 하는 방법도 있고, 이외

    initial, inherit, unset property 를 쓸 수 있습니다.

    http://www.w3schools.com/cssref/css_inherit.asp
    http://www.w3schools.com/cssref/css_initial.asp

    W3schools 에서는 기본적인 html, css, js, php 등을 배울 수 있습니다.

    Avatar of Matthew Park
    Attorney, front-end developer, digital media artist, WordPress enthusiast, & a father of 4 wonderful children.

    Lives in Colorado.

2 글 보임 - 1에서 2 까지 (총 2 중에서)
  • 답변은 로그인 후 가능합니다.