CSS Laravel修改问题

时间:2016-07-18 07:12:57

标签: css laravel

我下载了一个包含css js视图的电子商务平台的预制模板,以便应用于我的Laravel框架项目。它看起来非常好但我想做一些改变,例如背景的颜色。但是,一旦我尝试修改css文件的任何部分然后撤消修改,网站视图就变得非常糟糕。在我做出这样的修改之后,一些效果似乎已经撤消了,但是有些效果似乎已经不再有效了,任何解释或解决方案都可以解除我的修改?

我使用了MarkUps-dailyShop。修改后的style.css可以说删除下面的代码

#aa-header {
  display: inline;
  float: left;
  width: 100%;
}

即使我撤消了这样的改变,主页也有一些滑动条和下拉菜单,但现在所有这些效果都消失了,只留下了文字和颜色。

我使用Laravel 5.2

我将css和js脚本放在layouts.app中,如下所示

    <!DOCTYPE html>
    <html lang="en">
      <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">    
        <title>Soyegg</title>

        <!-- Font awesome -->
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css" integrity="sha384-XdYbMnZ/QjLh6iI4ogqCTaIjrFk87ip+ekIjefZch0Y+PvJ8CDYtEs1ipDmPorQ+" crossorigin="anonymous">
        <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:100,300,400,700">
        <!-- Bootstrap -->
        <link href="{{public_path('css/bootstrap.css')}}" rel="stylesheet">   
        <!-- SmartMenus jQuery Bootstrap Addon CSS -->
        <link href="{{public_path('css/jquery.smartmenus.bootstrap.css')}}" rel="stylesheet">
        <!-- Product view slider -->
        <link rel="stylesheet" type="text/css" href="{{public_path('css/jquery.simpleLens.css')}}">    
        <!-- slick slider -->
        <link rel="stylesheet" type="text/css" href="{{public_path('css/slick.css')}}">
        <!-- price picker slider -->
        <link rel="stylesheet" type="text/css" href="{{public_path('css/nouislider.css')}}">
        <!-- Theme color -->
        <link id="switcher" href="{{public_path('css/theme-color/default-theme.css')}}" rel="stylesheet">
        <!-- <link id="switcher" href="css/theme-color/bridge-theme.css" rel="stylesheet"> -->
        <!-- Top Slider CSS -->
        <link href="{{public_path('css/sequence-theme.modern-slide-in.css')}}" rel="stylesheet" media="all">

        <!-- Main style sheet -->
        <link href="{{public_path('css/style.css')}}" rel="stylesheet">    

        <!-- Google Font -->
        <link href='https://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>
        <link href='https://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
        <!-- datepicker -->
        <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
        <link rel="stylesheet" href="/resources/demos/style.css">
        <!-- datepicker end -->

        <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
          <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
        <![endif]-->

<!-- contents-->


@include('layouts.navbar')

@yield('content')

@include('layouts.footer')

    <!-- jquery-2.2.4.min.js -->
    <script src="{{ public_path('/js/jquery-2.2.4.min.js') }}"></script>
    <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
    <!-- Bootstrap.min.js -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
    <!-- JavaScripts -->
    {{-- <script src="{{ elixir('js/app.js') }}"></script> --}}
    <script src="js/jquery.smartmenus.js"></script>
    <!-- SmartMenus jQuery Bootstrap Addon -->
    <script src="js/jquery.smartmenus.bootstrap.js"></script>  
    <!-- To Slider JS -->
    <script src="js/sequence.js"></script>
    <script src="js/sequence-theme.modern-slide-in.js"></script>  
    <!-- Product view slider -->
    <script src="js/jquery.simpleGallery.js"></script>
    <script src="js/jquery.simpleLens.js"></script>
    <!-- slick slider -->
    <script src="js/slick.js"></script>
    <!-- Price picker slider -->
    <script src="js/nouislider.js"></script>
    <!-- Custom js -->
    <script src="js/custom.js"></script> 

  </body>
</html>

1 个答案:

答案 0 :(得分:0)

我刚刚发现了问题所在。我将public_path('css / style.css')更改为url('css / style.css')后再次工作 laravel不应该通过本地目录读取css吗?