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();?>/" />

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

报告相同问题?

悬赏问题

  • ¥15 想问一下树莓派接上显示屏后出现如图所示画面,是什么问题导致的
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号