金小颖论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 通杀 破解 教程
 PUBG解机器码
SK魔兽盒子
查看: 52|回复: 0

[Typecho源码] Typecho主题加上loading效果教程

[复制链接]
  • TA的每日心情
    开心
    8 小时前
  • 签到天数: 80 天

    [LV.6]常住居民II

    744

    主题

    131

    回帖

    4万

    积分

    管理员

    积分
    47310
    发表于 2023-3-17 13:47:33 | 显示全部楼层 |阅读模式
    当面击网页进进时会有一个lading跳动弹绘页里,正在网站翻开速率较缓或是其他状况时,减载页里能低落会见者封闭网页的概率,喜好的按照网站本人的需供利用吧,结果图以下

    202303161678966207264163.jpg


    教程开端
    第一步:
    新建一个loading款式css
    将以下代码放出来 然后援用那个文件

    1. #Loadanimation{
    2.     background-color:#fff;
    3.     height:100%;
    4.     width:100%;
    5.     position:fixed;
    6.     z-index:1;
    7.     margin-top:0px;top:0px;
    8.    
    9. }
    10. #Loadanimation-center{
    11.     width:100%;
    12.     height:100%;
    13.     position:relative;
    14.    
    15. }
    16. #Loadanimation-center-absolute{
    17.     position:absolute;
    18.     left:50%;
    19.     top:50%;
    20.     height:200px;
    21.     width:200px;
    22.     margin-top:-100px;
    23.     margin-left:-100px;
    24.    
    25. }
    26. .xccx_object{
    27.     -moz-border-radius:50% 50% 50% 50%;
    28.     -webkit-border-radius:50% 50% 50% 50%;
    29.     border-radius:50% 50% 50% 50%;
    30.     position:absolute;
    31.     border-left:5px solid #87CEFA;
    32.     border-right:5px solid #FFC0CB;
    33.     border-top:5px solid transparent;
    34.     border-bottom:5px solid transparent;
    35.     -webkit-animation:animate 2.5s infinite;
    36.     animation:animate 2.5s infinite;
    37.    
    38. }
    39. #xccx_one{
    40.     left:75px;
    41.     top:75px;
    42.     width:50px;
    43.     height:50px;
    44.    
    45. }
    46. #xccx_two{
    47.     left:65px;
    48.     top:65px;
    49.     width:70px;
    50.     height:70px;
    51.     -webkit-animation-delay:0.1s;
    52.     animation-delay:0.1s;
    53.    
    54. }
    55. #xccx_three{
    56.     left:55px;
    57.     top:55px;
    58.     width:90px;
    59.     height:90px;
    60.     -webkit-animation-delay:0.2s;animation-delay:0.2s;
    61.    
    62. }
    63. #xccx_four{
    64.     left:45px;
    65.     top:45px;
    66.     width:110px;
    67.     height:110px;
    68.     -webkit-animation-delay:0.3s;
    69.     animation-delay:0.3s;
    70.    
    71. }
    72. @-webkit-keyframes animate{50%{
    73.     -ms-transform:rotate(180deg);
    74.     -webkit-transform:rotate(180deg);
    75.     transform:rotate(180deg);
    76.    
    77. }
    78. 100%{-ms-transform:rotate(0deg);
    79.     -webkit-transform:rotate(0deg);
    80.     transform:rotate(0deg);
    81.    
    82. }
    83.    
    84. }
    85. @keyframes animate{50%{
    86.     -ms-transform:rotate(180deg);
    87.     -webkit-transform:rotate(180deg);
    88.     transform:rotate(180deg);
    89.    
    90. }
    91. 100%{
    92.     -ms-transform:rotate(0deg);
    93.     -webkit-transform:rotate(0deg);
    94.     transform:rotate(0deg);
    95.    
    96. }
    97. }
    复造代码


    第两步:
    将以下代码挖写进头部文件 普通皆为 header.php


    1. <div id="Loadanimation" style="z-index:999999;">
    2. <div id="Loadanimation-center">
    3.     <div id="Loadanimation-center-absolute">
    4.         <div class="xccx_object" id="xccx_four"></div>
    5.         <div class="xccx_object" id="xccx_three"></div>
    6.         <div class="xccx_object" id="xccx_two"></div>
    7.         <div class="xccx_object" id="xccx_one"></div>
    8.     </div>
    9. </div>
    10. </div>
    11. <script>
    12. $(function(){
    13.     $("#Loadanimation").fadeOut(540);
    14. });
    15. </script>
    复造代码
    留意 留意 fadeOut 内里挖写的是毫秒数

    贡献值排行榜:
    温馨提示:
    1、在论坛里发表的文章仅代表作者本人的观点,与本网站立场无关。
    2、论坛的所有内容都不保证其准确性,有效性,时间性。阅读本站内容因误导等因素而造成的损失本站不承担连带责任。
    3、当政府机关依照法定程序要求披露信息时,论坛均得免责。
    4、若因线路及非本站所能控制范围的故障导致暂停服务期间造成的一切不便与损失,论坛不负任何责任。
    5、注册会员通过任何手段和方法针对论坛进行破坏,我们有权对其行为作出处理。并保留进一步追究其责任的权利。
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    温馨提示

          金小颖论坛(www.52jiny.com)一个致力于免费分享全网资源,主要分为网站源码,网站模板,网站插件,技术教程,资源秉承着清爽界面,欢迎您的体验。

    1、在论坛里发表的文章仅代表作者本人的观点,与本网站立场无关。

    2、论坛的所有内容都不保证其准确性,有效性,时间性。阅读本站内容因误导等因素而造成的损失本站不承担连带责任。

    3、当政府机关依照法定程序要求披露信息时,论坛均得免责。

    4、若因线路及非本站所能控制范围的故障导致暂停服务期间造成的一切不便与损失,论坛不负任何责任。

    5、注册会员通过任何手段和方法针对论坛进行破坏,我们有权对其行为作出处理。并保留进一步追究其责任的权利。

    QQ|51LA统计|Archiver|手机版|小黑屋|金小颖论坛 ( 浙ICP备2022006091号 )|网站地图

    GMT+8, 2023-4-2 16:35 , Processed in 0.211828 second(s), 50 queries .

    Powered by Discuz! X3.5

    Copyright © 2001-2023 Tencent Cloud.

    快速回复 返回顶部 返回列表