2
기사 속성을 변경하고 싶지만 섹션 속성을 설정해도 작동하지 않는 것 같습니다. 예를 들어 :섹션 내부의 기사 속성을 변경할 수 없습니다.
<html>
<style type="text/css">
section{
margin:2px auto;
background-color:green;
border:2px solid blue;
width:500px;
height:10em;
};
/* will not work for article*/
article{
padding:auto;
margin:2px auto;
background-color:red;
border:2px dashed red;
width:100px;
height:2em;
}
</style>
<body>
<section>
<article>hello</article>
<article>hello</article>
<article>hello</article>
</section>
</body>
</html>
하지만 이후 섹션에 대한 CSS 코드를 제거, 그것은 작동합니다
<html>
<style type="text/css">
/*works now*/
article{
margin:2px auto;
background-color:red;
border:2px dashed red;
width:100px;
height:2em;
}
</style>
<body>
<section>
<article>hello</article>
<article>hello</article>
<article>hello</article>
</section>
</body>
</html>
내가
나는 그것을 좋아한다. –