gpt4 book ai didi

php - 在 PHP 中刷新我的注册(注册)表单后,CSS 不会加载

转载 作者:太空宇宙 更新时间:2023-11-04 07:30:48 24 4
gpt4 key购买 nike

我正在学习 PHP,我在网上找到了有用的教程,所以我正在尝试用 PHP 构建我的第一个网站。我的 CSS 实现有问题。我始终保持与 localhost 的选项卡打开,因此我不必每次更改某些内容时都运行它。问题是,当我编写一些 CSS 代码时,它会加载到我的注册表单上,但是当我刷新页面时,就好像我从未为该页面编写过 CSS 代码一样。 (抱歉英语不好我希望你们明白我想说什么..)

这是 signup.php 代码:

     <div class="container">
<div class="row" style="text-align:center;">
<h3>EPO - Sistem - Registracija </h3>
</div>

<div class="row sub_msg">
<p> Veb aplikacija za evidenciju predispitnih obaveza. </p>
</div>

<div class="row signup">
<div class="row">
<h3> Dobrodosli, molimo Vas, unesite podatke za registraciju. </h3>
</div>

<form action="" method="post" class="form-horizontal">

<div class="row form-group input_group">
<label for="" class="col-sm-2" >E-mail:</label>

<div class="col-sm-10">
<input type="text" name="email" class="form-control">
</div>
</div>

<div class="row form-group input_group">
<label for="" class="col-sm-2" >Firstname:</label>

<div class="col-sm-10">
<input type="text" name="firstname" id="firstname" class="form-control">
</div>
</div>

<div class="row form-group input_group">
<label for="" class="col-sm-2" >Lastname:</label>

<div class="col-sm-10">
<input type="text" name="lastname" id="lastname" class="form-control">
</div>
</div>

<div class="row form-group input_group">
<label for="" class="col-sm-2" >Password:</label>

<div class="col-sm-10">
<input type="password" name="password" id="password" class="form-control">
</div>
</div>

<div class="row form-group" style="margin:0px 10px 20px 10px">
<div class="col-xs-12">
<input type="submit" name="submit" id="Registruj se" class="form-control">
</div>
</div>





</form>

</div>

</div>

这是索引页:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>EPO - Pocetna stranica</title>

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>

<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

<link rel="stylesheet" href=" ./css/custom.css">

</head>
<body>

<nav class="navbar" style="background-color: #c40707">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand crud" style="color: darkgray !important" href="#">EPO Aplikacija</a>
</div>
</div>
</nav>

<div class="container">
<ul class="nav nav-tabs">
<li><a data-toggle='tab' href="#index">Pocetna stranica</a></li>
<li><a data-toggle='tab' href="#login">Ulogujte se</a></li>
<li><a data-toggle='tab' href="#signup">Prijavite se</a></li>
</ul>


<div class="tab-content">
<div id="index" class="tab-pane fade in">
<p>Index</p>
</div>

<div id="login" class="tab-pane fade in">
<p>Login</p>
</div>

<div id="signup" class="tab-pane fade in">
<?php include("./user/signup.php"); ?>

</div>


</div>


</div>




</body>
</html>

这是CSS代码:

body{
background-color: darkgray;
font-size: 22px;
margin: 0;
padding: 0;
}


.crud{

width:auto;
color: #605d5d !important;
font-size: 25px;
font-weight: 800;
}


.sub_msg{
text-align: center;
padding: 10px 0px 20px 0px;
}

.signup{
border: 1px solid #c40707;
text-align: center;
width: 60%;
height: auto;
margin: auto;
}

.input_group{
margin: 0px 20px 20px 20px;
}

.input_group input{
height: 40px;
font-size: 20px;

}

input[type="submit"]{
height: 40px;
font-size: 20px;
font-weight: bold;
background-color: #c40707;
color: #605d5d !important;

}

我困了她两个多小时,我很确定这是一些初学者的愚蠢错误,但我找不到它..

最佳答案

更正 from <link rel="stylesheet" href=" ./css/custom.css"> 的路径至 <link rel="stylesheet" href="./css/custom.css">

如果还是不行,那么force your browser to refresh the stylesheet .

关于php - 在 PHP 中刷新我的注册(注册)表单后,CSS 不会加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49428513/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com