kbd{position:relative;color:#28a1f0;}
kbd:before{position:absolute;content:'Double click to select';display:table;bottom:23px;left:0;background:#1abc9c;color:#fff;padding:6px;border-radius:2px;font-size:75%;line-height:1;opacity:0;visibility:hidden;transform:scale(0.8);z-index:2;transition:all .3s;}
kbd:hover:before{transform:scale(1.0);opacity:1;visibility:visible;transition:all .3s}
2. Selanjutnya sobat taruh java script berikut tepat diatas kode </body><script type='text/javascript'>
//<![CDATA[
// Double Click
$('i[rel="pre"]').replaceWith(function(){return $("<pre><code>"+$(this).html()+"</code></pre>")});for(var pres=document.querySelectorAll("pre,code,kbd,blockquote,td"),i=0;i<pres.length;i++)pres[i].addEventListener("dblclick",function(){var e=getSelection(),t=document.createRange();t.selectNodeContents(this),e.removeAllRanges(),e.addRange(t)},!1);
function downloadJSAtOnload(){var e=document.createElement("script");e.src="https://cdn.rawgit.com/Arlina-Design/FlamingTree/master/highlightpro.js",document.body.appendChild(e)}window.addEventListener?window.addEventListener("load",downloadJSAtOnload,!1):window.attachEvent?window.attachEvent("onload",downloadJSAtOnload):window.onload=downloadJSAtOnload;
//]]>
</script>
3. Kemudian simpan template sobat. 4. Untuk Memanggil Kode tersebut agar bisa aktif gunakan cara berikut: - Buat Postingan baru, sobat pilih halaman HTML
- Selanjutnya sobat berikan tanda berikut
<kbd>Isi text sobat disini</kbd>
0 Comments