css before, after 에서 iframe 또는 script 불러올수있나요? 채택완료

4년 전 조회 2,112

<style>

#bo_con p:nth-last-child(2)::before {   
content:'<?php readfile(G5_THEME_url.'/abcd_1.php'); ?>  ';  
color:red;
}

#bo_con p:nth-last-child(1)::after{   
content:'<?php readfile(G5_THEME_url.'/abcd_2.php'); ?>  ';  
color:red;
}

</style>  

 abcd_1.php  내용-

<iframe src="https://"></iframe>

 abcd_2.php  내용-

<script src="https://abc.co.kr/aer.js"></script>
<script> 
</script>

답변 4개

채택된 답변
+20 포인트

에이 저러면 안되여~ 창조는.. 적당히.. 

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

ㅎㅎ

댓글을 작성하려면 로그인이 필요합니다.

답변감사합니다. 

ㅎㅎ

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

그냥 이렇게 하시면 되지 않나요?

<div id="bo_con" >

...
<?php readfile(G5_THEME_url.'/abcd_2.php'); ?>

</div>
 

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

::before와 ::after로 생성한 의사 요소는 원본 요소의 서식 박스에 포함되므로, <img>나 <iframe> 등 대체 요소에 적용할 수 없습니다  - 구글검색 - 

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인
🐛 버그신고