틀:이미지: 두 판 사이의 차이

항공위키
편집 요약 없음
편집 요약 없음
3번째 줄: 3번째 줄:
</noinclude><includeonly><div class="img_box thumbinner" {{#if:{{{스타일|}}} | style="{{{스타일|}}}" }}>{{{이미지|}}} {{#if:{{{설명|}}} | <div class="thumbcaption">{{{설명|}}}}}</div></div></includeonly>
</noinclude><includeonly><div class="img_box thumbinner" {{#if:{{{스타일|}}} | style="{{{스타일|}}}" }}>{{{이미지|}}} {{#if:{{{설명|}}} | <div class="thumbcaption">{{{설명|}}}}}</div></div></includeonly>
<noinclude>
<noinclude>
<script type="text/javascript">
var img = document.getElementsByTagName("img");
    for (var x = 0; x < img.length; x++) {
      img.item(x).onclick=function() {window.open(this.src)};
    }
</script>
<templatedata>
<templatedata>
{
{
33번째 줄: 39번째 줄:
</templatedata>
</templatedata>
</noinclude>
</noinclude>
<script type="text/javascript">
var img = document.getElementsByTagName("img");
    for (var x = 0; x < img.length; x++) {
      img.item(x).onclick=function() {window.open(this.src)};
    }
</script>

2021년 12월 23일 (목) 21:14 판

"이미지" 틀입니다.

다음 형식으로 호출해야 합니다:

{{이미지
|이미지=
|스타일=
|설명=
}}

틀 텍스트를 보려면 문서를 편집하세요.


<script type="text/javascript"> var img = document.getElementsByTagName("img");

   for (var x = 0; x < img.length; x++) {
     img.item(x).onclick=function() {window.open(this.src)}; 
   }

</script>

이미지를 본문 가운데 정렬로 보여주는 틀 (기본 사이즈 400px) 특히 외부 이미지 링크로 삽입 시 유용 필요시 스타일을 별도로 지정할 수 있음

틀 변수

이 틀은 변수마다 줄바꿈을 하여 쓰는 것이 권장됩니다.

변수설명형식상태
이미지 주소이미지

이미지 주소

자동 값
짧은 문구필수
이미지 설명설명

이미지 캡션

짧은 문구필수
스타일스타일

스타일

예시
width: 400px; float: right; 등
자동 값
width: 203px; float: right; margin-left: 15px; clear: right;
짧은 문구필수