• 相关文章调用,如果文章没有图片,随机调用预先上传图片

    <ul class="related"><span><h1>相关文章</h1></span>
                          {php}
                            $related = $zbp->GetArticleList('*', array(array('=', 'log_Type', 0), array('=', 'log_Status', 0)), array('log_PostTime' => 'DESC'), 5, null,false);
                           {/php} {foreach GetList(5,$article.Category.ID) as $related}
                         
                        <li  style="float:left; width: 15%; height: 200px;padding: 12px; ">
                          
                                <img src="
                          {php}
                   $randimg=rand(1,4);
                  $pattern="/<[img|IMG].*?src=[\'|\"](.*?(?:[\.gif|\.jpg|\.png]))[\'|\"].*?[\/]?>/";
                  $content = $related->Content;
                              preg_match_all($pattern,$content,$matchContent);
                                  if(isset($matchContent[1][0]))
                                 $randimg=$matchContent[1][0];
                                 else
                                 $randimg="$host/zb_users/theme/default/style/default/$randimg.jpg";
                                  {/php}
                                {$randimg}"
                                class="pic" width="100%" title="{$related.Url}" height="50%" alt="{$related.Url}"
                                pagespeed_url_hash="3167944164">
                            </a>
                            <a href="{$related.Url}" title="{$related.Title}">
    
              {$related.Title}	</a>
                           
                        </li>
                     {/foreach}
                    </ul>
  • css图片与文字水平对齐

    <strong>
      <img  src="http://sanshao.net/zb_users/upload/2021/10/202110241635043445386180.png"style="width: 80px; height: 80px; vertical-align:middle"/>多年个人优秀作品  </strong>
  • 搜索样式美化

          <dl class="function" id="divSearchPanel"style=" width:180px; float:right;">
    
    
    
    
       <div><form name="search" method="post" action="/zb_system/cmd.php?act=search"style=" border:1px solid #ccc;border-radius:5px  ;width:305PX;height:38px;">
           <input type="text" name="q"  style=" width:260PX;height:35px;float:left;border:0px ; font-size:2em;"/> <input type="submit" value="" 
           style="width:40PX;background: url(http://sanshao.net/zb_users/upload/2021/10/20211021212428163482266865892.png) no-repeat  center;height:40px;border:0px ;float:left;"/></form></div>
    
    
    </dl>
  • ZBLOG网站迁移

    1. 原站文件打包下载备用,

    2. 2.创建一个新的站点 ,

    3. 创建一个新文件夹上传打包下载文件解压

  • ZBLOG评论图像鼠标放上去旋转

    查看效果

    .msgname img  {-webkit-transition:.4s all ease-in-out;-moz-transition:.4s all ease-in-out;-o-transition:.4s all ease-in-out;-ms-transition:.4s all ease-in-out;transition:.4s all ease-in-out}
    
    .msg:hover .msgname img {-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-o-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}
  • jQuery实现智能判断固定导航条或侧边栏的方法

     <div id="divToptop" ><h1 id="BlogTitle"><a href="{$host}">{$name}</a></h1><h3 id="BlogSubTitle">{$subname} </h3> <div id="divNavBar"><ul>

  • Z-Blog搜索美化

       <form name="search" method="post" action=" /zb_system/cmd.php?act=search"style="width:320PX;height:30px;"><input type="text" name="q" size="18"  class="" style="width:260PX;height:35px;float:left;"/> 
           
            <input type="submit" value=""  style="width:40PX;background: url(http://www.bnak.cn/zb_users/upload/2021/10/20211003120944163323418454811.png) no-repeat  center;height:40px;float:left;" class=" "/>
         </form>
  • ZBLOG相关文章上一篇下一篇

    <p>上一篇:<a href="{$article.Prev.Url}" title="{$article.Prev.Title}">{$article.Prev.Title}</a></p>

    {/if}

    {if $article.Next}

    <p>下一篇: <a href="{$article.Next.Url}" title="{$article.Next.Title}">{$article.Next.Title}</a></p>

  • 列表页普通文章

    {* Template Name:列表页普通文章 *}
    <ul id=pos> <li>
        
        <div class="post multi">
    
        {php}
        $randimg=mt_rand(1,5);
        $pattern="/<[img|IMG].*?src=[\'|\"](.*?(?:[\.gif|\.jpg|\.png]))[\'|\"].*?[\/]?>/";
        $content = $article->Content;
        preg_match_all($pattern,$content,$matchContent);
        if(isset($matchContent[1][0]))
            $randimg=$matchContent[1][0];
        else
            $randimg=$zbp->host."zb_users/theme/um_blog/style/images/$randimg.jpg";
    {/php}
    
    
    
    <div class="post cate{$article.Category.ID}  auth{$article.Author.ID}">
          
          <div class="post_r">
             
            <div class="post_body">     
            
             
             
             <div id="post_Title"><h2><a href="{$article.Url}" title="{$article.Title}">{$article.Title}</a></h2> <br></div> 
           
           
           <div id="post_tim">
           
            <div class="post_time"><h5>{$article.Time('d')}</h5><h6>{$article.Time('Y')}<br />{$article.Time('m')}</h6></div>
         
         <div id="img01"><span class="img01"><img src="{$randimg}" />  <span></div>
         
         </div> 
    
              <div class="post_content">{$article.Intro}          </div>
    
              
               <div class="post-link"><a href="{$article.Url}" class="btn btn1">阅读全文</a></div>
            
    
              <div class="post_info">作者:{$article.Author.StaticName} | 分类:{$article.Category.Name} | 浏览:{$article.ViewNums} | 评论:{$article.CommNums}</div>
              
              
            </div>
          </div>
          
          
         <div class="clear"></div>
    
    
    </div> </li>
  • 图片轮播

    <div class="header-ADS">
        <div id="LPAdSlots-23296" class="LPAdSlots" data-loaded="loaded" data-completed="completed" style="width: 100%; height: 290px;"><div class="swiper-wrap-ad23296">
        <ul class="swiper-box">
          <li style="background: rgb(232, 236, 242) url(http://weixui.com/zb_users/upload/2019/06/20190607211651155991341197368.jpg) no-repeat scroll center 0px; display: block;">
    
    
    <a href="http://weixui.com/" target="_blank"></a>
    
    </li>
          <li style="background: rgb(201, 187, 161) url(http://weixui.com/zb_users/upload/2019/07/20190703224556156216515662176.jpg) no-repeat scroll center 0px; display: none;">
    
    <a href="http://weixui.com/" target="_blank"></a>
    
    </li>
          <li style="background: rgb(251, 231, 150) url(http://weixui.com/zb_users/upload/2019/06/201906151560604634195782.jpg) no-repeat scroll center 0px; display: none;">
    
    <a href=" http://weixui.com/" target="_blank"></a>
    
    </li>
    
      </ul>
        <div class="dot-wrap"><span class="active"></span><span class=""></span><span class=""></span></div>
      </div>
      <style>
        .swiper-wrap-ad23296{
          overflow: hidden;
          width: 100%;
          height: 100%;
          position: relative;
        }
        .swiper-wrap-ad23296 .swiper-box li{
          left: 0;
          top: 0;
          text-align: center;
          width: 100%;
          height: 290px;
          display: none;
          position: absolute;
        }
        .swiper-wrap-ad23296 .swiper-box li a{
          display: block;
          height: 290px;
          width: 980px;
          margin: 0 auto;
        }
        
        .swiper-wrap-ad23296 .swiper-box li:first-child{
          display: block;
        }
        .swiper-wrap-ad23296 .dot-wrap{
          width: 100%;
          bottom: 20px;
          height: 15px;
          padding: 10px 0;
          position: absolute;
          text-align: center;
        }
        .swiper-wrap-ad23296 .dot-wrap span{
          width: 18px;
          height: 18px;
          cursor: pointer;
          transition: .5s all;
          display: inline-block;
          margin-right: 10px;
          border-radius: 20px;
          background-color: rgba(255,255,255,0.5);
        }
        .swiper-wrap-ad23296 .dot-wrap span.active{
            background-color: #fff;
        }
        .swiper-wrap-ad23296 .dot-wrap span:hover{
          opacity: 1;
        }
      </style>
      <script type="text/javascript">
        (function(){
          var $wrap = $('.swiper-wrap-ad23296'),       // 轮播外层盒子
          $box = $wrap.find('.swiper-box'),                  // 轮播图片ul
          $li = $box.find('li'),                             // 轮播li
          $eachW = $li.width(),                              // 每个li的宽度
          $dotWrap = $wrap.find('.dot-wrap'),                // 圆形索引
          $liLength = $li.length;                            // li的总个数
          if($liLength > 1){
            // 初始化圆形索引
            var html = '<span class="active"></span>';
            for(var j = 0; j < $liLength-1; j++){
              html+='<span></span>'
            }
            $dotWrap.append(html);
            var $dot = $dotWrap.find('span'),
              i = 0, timer;
            // 自动轮播
            autoPlay();
            // 圆形索引事件
           $dot.on('click', function(){
               clearInterval(timer);
               i = $(this).index();
               move();
               autoPlay();
            });
            function autoPlay(){
              timer = setInterval(function(){
                i >= $liLength - 1 ? i = 0 : i++;
                move();
              }, 6000);
            };
            function move(){
              $li.fadeOut().eq(i).fadeIn();
              $dot.removeClass('active').eq(i).addClass('active');
            };
          }
        })();
      </script></div>
    </div>
  • css毛边效果

    <style>
    #mbxg{ width:100px; height:100px; border-radius:50px;-moz-border-radius: 50px;-webkit-border-radius: 50px;background-color:#09F; float:left; margin:0 0 0 10px;border:2px solid #09F;}
    #mbxg:hover{border:2px solid #fff;box-shadow:0 0 5px #09a;}
    </style>
      <div id="mbxg"></div>
  • css鼠标放上图片逐渐变大

    img:hover{transform: scale(1.2);}

  • CSS图片自适应大小

  • css自动隐藏文字

    div   .post_content

  • 版权声明

    <strong>本文地址:</strong><a href="{$article.Url}" title="{$article.Title}"  target="_blank">{$article.Url}</a><br/>          &nb

  • 点击排行

    <h2 class="htitle">点击排行</h2>       <ul>    {php} $order = array('log_ViewNums'=>'DESC'); $where = array(array('=','log_St

  • Z-Blog搜索

    <form name="search" method="post" action=" /zb_system/cmd.php?act=search"><input type="text" name="q" size="18"  class="text"s

  • Z-Blog PHP zblog固定#divSidebar模块

     #divSidebar
    {
    position:sticky;
    top: 3px;
    left: 10px;
    
    }
    #divMain{
        width:720px;
        margin:10px 0 0 0;
        padding:0 0 30px 10px;
        text-align:left;
        float:left;height:1834px;
    
    }
  • Z-Blog留言本

     <div id="pl"> <div class="post-body"><h1>&nbsp;联系我们</h1></div> <ul class="msg msghead"> <li class="tbname">评论列表</li> </

  • 网站分类
    搜索
    最新留言
      文章归档