dsvjw20866 2014-11-27 02:39
浏览 52
已采纳

nivo滑块图像显示模板但不显示CodeIgniter是什么原因?

1.Image of nivo slider display in my template . But when I use it into codeIgniter then it can not display. 2.Others content of template shows but only image does not show . 3.With firebug I saw when nivoslider div act then it show image tag where visibility:hidden and background show url of image not found.

I am newbie . Please help me.


Master page :

This is code:

 <title>This is Title</title>
                <meta name="viewport" content="width=device-width, initial-scale=1.0">
                <!-- Bootstrap -->
                <link href="<?php echo base_url();?>css/bootstrap.min.css" rel="stylesheet" media="screen">
                <link href="<?php echo base_url();?>css/bootstrap-theme.min.css" rel="stylesheet" media="screen">

                <!-- Amazing Mobile Menu CSS -->
                <link href="<?php echo base_url();?>css/jquery.fs.naver.css" rel="stylesheet" type="text/css" />        

                <!-- News Tickr CSS -->
                <link href="<?php echo base_url();?>css/ticker-style.css" rel="stylesheet" type="text/css" />

                <!-- Bebas Webfont -->
                <link href="<?php echo base_url();?>fonts/stylesheet.css" rel="stylesheet" media="screen">  
                <!-- Nivo Slider CSS -->
                <link rel="stylesheet" href="<?php echo base_url();?>css/themes/default/default.css" type="text/css" media="screen" />
                <link rel="stylesheet" href="<?php echo base_url();?>css/nivo-slider.css" type="text/css" media="screen" />
                <!-- Main CSS -->
                <link href="<?php echo base_url();?>css/style.css" rel="stylesheet" media="screen">

                <!-- Responsive Framework -->
                <link href="<?php echo base_url();?>css/responsive.css" rel="stylesheet" media="screen">



        **html code for nivoslider:**

        <div id="slider" class="nivoSlider">
                                    <img src="<?php echo base_url();?>img/toystory.jpg" alt="" />
                                    <img src="<?php echo base_url();?>img/up.jpg" alt="" />
                                    <img src="<?php echo base_url();?>img/walle.jpg" alt="" />
                                    <img src="<?php echo base_url();?>img/nemo.jpg" title="#htmlcaption" alt="" />
                                </div>

    ''''''''''''''''''''''''''''
    '''''''''''''''''''''''''''    **others code here**![enter image description here][1]

    this code for script:

    <script src="http://code.jquery.com/jquery-1.9.0.js"></script>
            <script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
            <script src="<?php echo base_url();?>js/jquery.nivo.slider.pack.js"></script>
        <script type="text/javascript">
        $(window).load(function() {
            $('#slider').nivoSlider({
                controlNav: false
            });
        });
        </script>   
            <script src="<?php echo base_url();?>js/jquery.ticker.js" type="text/javascript"></script>
            <script type="text/javascript">
                $(function () {
                    $('#js-news').ticker();
                });
            </script>       
            <script src="<?php echo base_url();?>js/jquery.fs.naver.min.js"></script>
            <script type="text/javascript">
                $("nav").naver({
                    animated: true
                });     
            </script>
            <script src="<?php echo base_url();?>js/bootstrap.min.js"></script>



  • 写回答

1条回答 默认 最新

  • drcmg28484 2014-11-27 16:47
    关注

    Change

    <?php echo base_url();?>img/toystory.jpg

    into

    <?php echo base_url();?>/img/toystory.jpg

    (note the slash).

    Or even better: remove all <?php echo base_url();?> and add in your head:

    <base href="/" /> or <base href="<?php echo base_url();?>/" />

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 lammps拉伸应力应变曲线分析
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
  • ¥30 python代码,帮调试,帮帮忙吧
  • ¥15 #MATLAB仿真#车辆换道路径规划