CSS에서는 CSS의 일부 특정 요소 안에있는 요소에 스타일을 적용 할 수 있습니까?특정 요소 내부에있는 요소 옆에있는 요소
예 : 당신이 볼 수 있듯이
<div class="container">
<p>bla bla bla some text</p>
<p>bla bla bla some text</p>
<p>bla bla bla some text</p>
<p> <img src="url-of-image.jpg" alt="something"/> </p>
<p>this is the text that i want to apply some style, example: bold, red color</p>
<p>bla bla bla some text</p>
<p>bla bla bla some text</p>
<p>bla bla bla some text</p>
<p> <img src="url-of-image.jpg" alt="something"/> </p>
<p>this is the text that i want to apply some style, example: bold, red color</p>
<p>bla bla bla some text</p>
<p>bla bla bla some text</p>
</div>
, 나는 단지 img
내부에있는 일부 p
후, 다음 p
에 스타일을 적용합니다.
.container
의 모든 내용은 데이터베이스 (MySQL)에서 가져온 것으로서 CKEditor 플러그인이 포함 된 textarea
의 POST를 통해 저장됩니다. 이 플러그 인은 모두 p
이며 이미지는 동일한 플러그인으로 삽입됩니다. 따라서 사용자는 수업을 진행할 수 없으며 텍스트를 입력하고 이미지를 삽입하며 (항상은 아님)이 경우 (텍스트 + img) 다음 p
은 스타일이있는 이미지 바닥 글이됩니다. 이것이 내가 이런 식으로해야하는 이유입니다.
이것을 달성 할 수 있습니까?
아니요, CSS로만 사용하지 마십시오 – j08691