分享
  • 收藏
  • 举报
    X
    便签设置中,提示找不到css 文件,地址中_STATIC_这个常量?这是什么鬼,在css文件地址中直接素材_STATIC_?
    • 啡巅 消费1381.19元 2019-09-10 21:59 21:59
    1105
    7


    便签设置中,提示找不到css 文件,地址中_STATIC_这个常量?这是什么鬼,在css文件地址中直接素材_STATIC_?

    12
    赏礼
    赏钱
    收藏
    点击回复
        全部留言
    • 7
    • 啡巅 普通粉丝 消费:1381.19元 2019-09-11 08:22 08:226楼
      <!--你当前选择的模板文件是:common/view/title/img_003.htm-->
      <link href="__STATIC__/images/template/title/img_003/style.css" rel="stylesheet" type="text/css" /> 
      <div class="qb_img_003">
      <?php if(is_array($__LIST__) || $__LIST__ instanceof \think\Collection || $__LIST__ instanceof \think\Paginator): $i = 0; $__LIST__ = $__LIST__;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$rs): $mod = ($i % 2 );++$i;?>
      <?php if(count($rs['picurls'])>1): ?>
      	<ul>
      		<li>
      			<h3><a href="<?php echo $rs['url']; ?>" target="_blank"><?php echo $rs['title']; ?></a></h3>
      			<section>
      				<?php foreach($rs['picurls'] AS $picurl):  ?>
      				<a href="<?php echo $rs['url']; ?>" target="_blank"><span><img src="<?php echo $picurl; ?>" onerror="this.src='__STATIC__/images/nopic.png'"/></span></a>
      				<?php  endforeach;  ?>
      			</section>
      		</li>
      	</ul>
      <?php  elseif($rs['picurl']):  ?>
      	<ul>
      		<ol><a href="<?php echo $rs['url']; ?>" target="_blank"><img src="<?php echo $rs['picurl']; ?>" onerror="this.src='__STATIC__/images/nopic.png'"/></a></ol>
      		<li>
      			<h3><a href="<?php echo $rs['url']; ?>" target="_blank"><?php echo $rs['title']; ?></a></h3>
      			<p><?php echo get_word($rs['content'],$cleng>10?:200); ?></p>
      			<div><?php echo $rs['time']; ?> · <?php echo $rs['view']; ?>次浏览</div>
      		</li>
      	</ul>
      <?php  else:  ?>
      	<ul>
      		<li>
      			<h3><a href="<?php echo $rs['url']; ?>" target="_blank"><?php echo $rs['title']; ?></a></h3>
      			<article><?php echo get_word($rs['content'],$cleng>10?:200); ?></article>
      			<div><?php echo $rs['time']; ?> · <?php echo $rs['view']; ?>次浏览</div>
      		</li>
      	</ul>
      <?php endif; ?>
      <?php endforeach; endif; else: echo "" ;endif; ?>
      </div>
      <script>
      $(window).resize(function () {          //当浏览器大小变化时
         qb_img_003(); 		
      });
      $(function(){ 
      	qb_img_003();
      });
      function qb_img_003(){
      	$('.qb_img_003').each(function(){
      		$(this).find('ul').removeAttr('class');
      		var thisObjW=$(this).width();
      		if(thisObjW>1200){
      			$(this).find('ul').addClass('type1');
      		}else if(thisObjW<1200 && thisObjW>801){
      			$(this).find('ul').addClass('type2');
      		}else if(thisObjW<800 && thisObjW>501){
      			$(this).find('ul').addClass('type3');
      		}else if(thisObjW<500 && thisObjW>351){
      			$(this).find('ul').addClass('type4');
      		}else{
      			$(this).find('ul').addClass('type5');
      		}
      	});
      }
      $('.qb_img_003 img').hover(
      	function(){$(this).animate({"max-width":"150%","max-height":"150%"},300);},
      	function(){$(this).animate({"max-width":"98%","max-height":"96%"},300);}
      );
      </script>

      所有的标签设置风格里面都带这个常量。导致页面css无法加载。。。

    0 赏钱 赏礼回复
    • admin 超级管理员 消费:3.04元 2019-09-10 22:03 22:036楼

      这是一个变量,代表 /public/static/  在CSS中的话,就直接使用 /public/static/ 这个吧


      snscn 消费:1862.35元 其他手机 2019-09-10 22:47
      其实一直想吐槽_STATIC_这个变量,两边的“_”有时候看着真的很违和,为何不用{}或者其它符号呢。
      阿赖耶识 消费:24.43元 2019-09-10 23:50

      因为这玩意不是齐博干的,是Thinkphp框架自带的

      还有 __ROOT__ ,__STATIC__ , __JS__ , __CSS__


      snscn 消费:1862.35元 其他手机 2019-09-11 00:50
      @torylf 这符号难看
      啡巅 消费:1381.19元 2019-09-11 08:12
      嗯,这是官方的标签设置中,设置其他模版后,css路径中带这个常量。不知道算不算是bug?
    1 赏钱 赏礼回复
    • wr1688 风格开发者 消费:2593.25元 2019-09-11 07:41 07:41
      华为
      6楼
      逛齐博请带点常识
    0 赏钱 赏礼回复
    更多回复
    恢复多功能编辑器
  • 3 1
  • 推荐内容
    扫一扫访问手机版
    请选择要切换的马甲:

     
    网页即时交流
    QQ咨询
    咨询热线
    020-28998648