Àkhir-akhir ini sangat ramai sekali di perbincangkan oleh semua kalangan blogger tentang bagaimana caranya memasang iklan floating Ads atau Sticky Ads di blog.
Apa itu Floating Ads?
Langkah Untuk Memulai
- Salin kode script.
- Tempel di editor text.
- Ubah kode iklan Adsense.
- Ganti dengan kode iklan milikmu.
- Selesai.
Kode Script Floating Ads
<style>.sticky-ad{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;overflow:visible;position:fixed;text-align:center;bottom:-250px;left:0;width:100%;z-index:999;max-height:2500px;background-image:none;background-color:#fff;box-shadow:0 0 5px 0 rgba(0,0,0,.2);margin-bottom:0;padding-top:4px;transition:all .4s ease-in-out}.sticky-ad-close-button{position:absolute;width:28px;height:28px;top:-28px;right:0;background-image:url("data:image/svg+xml;charset=utf8,%3csvg width='13' height='13' viewBox='341 8 13 13' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cg%3e%3cpath style='fill:%234F4F4F' d='M354 9.31L352.69 8l-5.19 5.19L342.31 8 341 9.31l5.19 5.19-5.19 5.19 1.31 1.31 5.19-5.19 5.19 5.19 1.31-1.31-5.19-5.19z'%3e%3c/path%3e%3c/g%3e%3c/svg%3e");background-size:13px 13px;background-position:9px;background-color:#fff;background-repeat:no-repeat;box-shadow:0 -1px 1px 0 rgba(0,0,0,.2);border:none;border-radius:12px 0 0 0;cursor:pointer}.sticky-ad-close-button:before{position:absolute;content:"";top:-20px;right:0;left:-20px;bottom:0}*{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}:active,:focus{outline:0}</style> <div class=’sticky-ad’ id=’sticky-ad’>
<!– Kode Iklan Mulai Disini –>
<script async=’async’ crossorigin=’anonymous’ src=’https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2132237029416670’/><!– Floating ADS –>
<ins class=’adsbygoogle’ data-ad-client=’ca-pub-2132237029416670′ data-ad-slot=’2800121526′ style=’display:inline-block;width:100%;height:105px’/>
<script>(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<!– Kode Iklan Sampai Disini –>
<button aria-label=’Close this ad’ class=’sticky-ad-close-button’ onclick=’document.getElementById('sticky-ad').style.display='none';’/> </div> <script>window.addEventListener("scroll",function(){var t=document.getElementById("sticky-ad");window.pageYOffset>300(t.style.bottom="0")},!1);</script>{codeBox}
Cara Memasang Script Iklan
- Buka
Blogger. - Tab halaman bagian list.
- Pilih tema dan edit HTML.
- Letakan kode tersebut di atas tag “</body>.
- Simpan tema “Selesai”.