티스토리 블로그 유튜브 가로 x 세로 비율을 유지한다.
티스토리 블로그 유튜브 비율 변경
경로 :블로그관리홈 > 꾸미기 > 스킨 편집 > html 편집 > HTML
① </head> 앞에 첨부한 script를 입력한다.
<script type="text/javascript">
$(window).resize(function(){resizeYoutube();});
$(function(){resizeYoutube();});
function resizeYoutube(){ $("iframe").each(function(){ if( /^https?:\/\/www.youtube.com\/embed\//g.test($(this).attr("src")) ){ $(this).css("width","100%"); $(this).css("height",Math.ceil( parseInt($(this).css("width")) * 480 / 854 ) + "px");} }); }
</script>
② 첨부파일
'IT' 카테고리의 다른 글
워드프레스 1년 결산 (애드센스 수익 공개) (23) | 2023.12.16 |
---|---|
티스토리 목차 만들기 (48) | 2023.11.18 |
티스토리 북클럽 스킨 상단 이미지 영역 제거 (52) | 2023.11.15 |
티스토리 본문 폰트 크기 & 줄 간격 수정 (0) | 2023.11.15 |
티스토리 사이드바 위치 고정 (46) | 2023.11.15 |