Blog Archive

Contact Me

Name

Email

Message

Credits

កើត​ចាស់​ឈឺ​ស្លាប់​ជា​ទៀងទាត់
🌱🌳⛈️🏡🛌💤⛈️🌧️🌳

Hover Setting

slideup

ដាក់ Back to Top ប៊ូតុងដោយមិនចាំបាច់ Scroll ឡើងលើ

Jul15,2024
Back to Top គឺ​ជា​កូន​ប៊ូតុង​មួយ​ប្រើ​សម្រាប់​ធ្វើ​ការ​រំកិល​ប្លុក​របស់​អ្នក​ទៅ​កាន់​ក្បាល​ទំព័រ​ដោយ​ស្វ័យ​ប្រវត្តិ​ ដោយ​អ្នក​មិន​ចាំ​បាច់​ប្រើ​កូន​កណ្ដុរ (Mouse) ដើម្បី​ Scroll ឡើយ​គ្រាន់​តែ​ចុច​ទៅ​លើ​ប៊ូតុង​ នោះ​វា​នឹង​រត់​ទៅ​កាន់​ក្បាល​ទំព័រ​ដោយ​ខ្លួន​ឯង​។

១-សូម​ចូល​ទៅ​កាន់​គណនី​ប្លុក​របស់​អ្នក​
២-ចូល​ទៅ​កាន់ Theme បន្ទាប់​មក Edit HTML
៣-ចម្លង​កូដ​ខាង​ក្រោម​ដាក់​ពី​ខាង​ក្រោម <head>
ចំណាំ​៖ ប្រ​សិន​បើ​អ្នក​មាន​កូដ Icon Font Awesome Version 5 រួច​រាល់​នៅ​ក្នុង​ស្បែក​ប្លុក​សូម​រំ​លង​ចំណុច​នេះ​
កូដ
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous"/>

៤-ចម្លង​កូដ​ខាង​ក្រោម​ដាក់​ពី​ខាង​លើ ]]></b:skin>
កូដ
.back-top{display:none;z-index:1010;width:32px;height:32px;position:fixed;bottom:25px;right:25px;cursor:pointer;overflow:hidden;font-size:13px;color:#fff;text-align:center;line-height:32px;box-shadow:0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);border-radius:2px}
.back-top:before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;background-color:#673AB7;transition:all 0.7s}
.back-top:after{content:'\f077';position:relative;font-family:"Font Awesome 5 Free";font-weight:600;transition:all 0.7s}
.back-top:hover:before,.back-top:hover:after,.nav-active .back-top:after,.nav-active .back-top:before{background:#111}
៥-ចម្លង​កូដ​ខាង​ក្រោម​ដាក់​ពី​ខាង​លើ </body>
កូដ
<script type='text/javascript'>
//<![CDATA[
$(".back-top").each(function(){var a=$(this);$(window).on("scroll",function(){100<=$(this).scrollTop()?a.fadeIn(250):a.fadeOut(250)}),a.click(function(){$("html, body").animate({scrollTop:0},500)})});
//]]>
</script>
<div class='back-top' title='Back to Top'></div>

៦-ចុច​ពាក្យ Save Theme​៕

No comments

Post a Comment