Membuat Tampilan Youtube Responsive di Blog

Membuat Tampilan Youtube Responsive di Blog - Sudah berapa lama nih update postingan disini, kali ini sa y a akan mencoba membuat tampilan ...

Membuat Tampilan Youtube Responsive di Blog - Sudah berapa lama nih update postingan disini, kali ini saya akan mencoba membuat tampilan youtube yang bisa kita pasang di blog agar bisa responsive. Kenapa harus responsive? seiring berkembangan responsive di dunia internet ini kita harus mengikuti dan menyesuaikannya embed, salah satunya adalah Youtube

Sebenarnya kita hanya memodifikasi pada embed agar tampilan yang akan terlihat bisa menyesuaikan device yang kita pakai. 
youtube responsive
Langsung saja simak tutorialnya berikut ini :
1. Simpan Jquery pada edit HTML dan letakkan diatas kode </head>
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js' type='text/javascript'/>
2. simpan Kode kode CSS di atas kode ]]></b:skin> atau </style>
.ytbvideo{
    text-align: center;
    background:linear-gradient(to bottom, #fefefe 0%, #d1d1d1 100%);
    border:1px solid #A8A8A8;
    border-radius:5px;
    margin:20px auto;
    width:80%;
    box-shadow: 1px 30px 30px -26px #818181;
}
.res-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin:8px;
}
.res-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border:0;
}
3. Simpan kode javascrip berikut diatas kode </body>
<script type='text/javascript'>
//<![CDATA[
setTimeout(function(){
$('.ytbvideo').each(function(){
$(this).replaceWith('<iframe class="ytbvideo loader" src="'+$(this).data('src')+'" allowfullscreen="allowfullscreen" height="281" width="500"></iframe>')})},5000);
//]]>
</script>
4. Selanjutkan kita menuju ke postingan dan masukkan kode
<div class="ytbvideo">
<div class="res-video">
<div class="ytbvideo loader" data-src="//www.youtube.com/embed/hX3XaILYM2c"></div>
</div>
</div>
Semoga bermanfaat
resource: http://www.kompiajaib.com/2014/02/modifikasi-tampilan-video-youtube.html

COMMENTS

BLOGGER: 20
Loading...
Name

Adsense,5,CSS,8,Font,1,HTML,5,Javascript,5,Jquery,1,Lain-lain,5,PHP,1,SEO,3,Template,45,Tips,2,Tutorial,50,Widget,1,
ltr
item
HBT Blog: Membuat Tampilan Youtube Responsive di Blog
Membuat Tampilan Youtube Responsive di Blog
http://1.bp.blogspot.com/-JE5VLhtfFGg/U5_JK3Hfp4I/AAAAAAAABvE/WpFfHXgtO8U/s1600/vidoyutube.png
http://1.bp.blogspot.com/-JE5VLhtfFGg/U5_JK3Hfp4I/AAAAAAAABvE/WpFfHXgtO8U/s72-c/vidoyutube.png
HBT Blog
http://hollabacktexas.blogspot.com/2014/06/membuat-tampilan-youtube-responsive-di.html
http://hollabacktexas.blogspot.com/
http://hollabacktexas.blogspot.com/
http://hollabacktexas.blogspot.com/2014/06/membuat-tampilan-youtube-responsive-di.html
true
4727374246882403435
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy