我在嘗試加載main.css文件的某些屬性時出現問題,從/user_create.html加載文件加載main.css就好了,但是當我嘗試從url.dev/user/create,它不加載所有的屬性,代碼從html複製/粘貼到我的blade.php文件中。Laravel不能正確加載CSS
HTML
<div class="container-fluid band-user-creation">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="row">
<div class="col-lg-4"></div>
<div class="col-lg-4 raleway-regular"><table >
<tbody>
...
<tr>
<td><input name="UserName" type="name" class="input-user-creation" placeholder="Ingresa tu Nombre"></td>
</tr>
<tr>
<td><input name="UserLastName" type="lastname" class="input-user-creation" placeholder="Ingresa tu Apellido"></td>
</tr>
...
CSS
.band-user-creation{
padding-top: 100px;
padding-bottom: 100px;
color: #212121;
text-align: center;
}
.input-user-creation{
background-color: #B2DD4C;
font-size: x-large;
border-radius: 10px;
padding-left: 10px;
border: transparent;
color: #F9F9F9;
margin-top: 5px;
min-width: 300px;
}
.HTML文件頭內容
<!DOCTYPE html>
<html lang="es">
<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>...</title>
<!-- Bootstrap -->
<link href="css/bootstrap.css" rel="stylesheet">
<link href="main.css" rel="stylesheet" type="text/css">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css?family=Raleway:300,400i,600,600i" rel="stylesheet">
...
...
<!-- 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]-->
</head>
編輯
.BLADE頭內容
<!DOCTYPE html>
<html lang="es">
<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>...</title>
<!-- Bootstrap -->
<link href="../../css/bootstrap.css" rel="stylesheet">
<link href="../../main.css" rel="stylesheet" type="text/css">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css?family=Raleway:300,400i,600,600i" rel="stylesheet">
...
...
<!-- 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]-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
</head>
當您檢查代碼時,您是否看到.css文件?如果你看到,當你在瀏覽器上訪問該文件時會發生什麼? – AgeValed
你可以在'user_create.html'文件和'.blade.php'文件中發佈你的html的'
'內容嗎? – stratedge@AgeValed我不是seing .band-user-creation類,也不是.input-user-creation類:/ – Schavcovsky