Computer >> 컴퓨터 >  >> 프로그램 작성 >> CSS

CSS를 사용하여
요소 내의 모든

요소를 선택합니다.

<시간/>

요소 요소 사용 다른 요소 안의 모든 요소를 ​​선택하려면 선택기를 사용합니다.

다음 코드를 실행하여 요소 요소를 구현할 수 있습니다. 선택기,

<!DOCTYPE html>
<html>
   <head>
      <style>
         div p {
            color: white;
            background-color: blue;
         }
      </style>
   </head>
   <body>
      <h1>Demo Website</h1>
      <h2>Fruits</h2>
      <p>Fruits are good for health.</p>
      <div>
         <p>This is demo text.</p>
      </div>
   </body>
</html>