2017-03-07 3 views
0

私は自分のフォームのデザインにブートストラップを使用していますが、例のようにフォームの背景色を表示していません。Boostrapは私のフォームの背景色を表示していません

すべてのフォントの色サイズ&ブートストラップのデザインが適用されますが、自分のフォームの背景がありません。

例のすべてのコードをコピーして貼り付けて、フォームの背景が表示されるかどうかを確認しますが、それでもブートストラップテーマの背景色は表示されませんでした。

私はbootstrap.cssbootstrap.min.cssをhtmlファイルに含めました。不足しているコードが前にありhttps://bootswatch.com/flatly/

HTMLコード

<!DOCTYPE html> 
<html> 
<head> 
    <meta charset="utf-8"> 
    <link rel="stylesheet" href="style.css"> 
    <link rel="stylesheet" href="bootstrap.css"> 
    <link rel="stylesheet" href="bootstrap.min.css"> 
    <title>Users</title> 
</head> 
<body> 
    <form class="form-horizontal col-lg-7" style="border: 1px solid red;" action="/index.php"> 
    <fieldset> 
     <div class="form-group"> 
     <label for="inputUsername" class="col-lg-3 control-label">Username</label> 
     <div class="col-lg-3"> 
      <input type="text" class="form-control" id="inputUsername" placeholder="Enter Username"> 
     </div> 
     </div> 

     <div class="form-group"> 
     <label for="inputPassword" class="col-lg-3 control-label">Password</label> 
     <div class="col-lg-3"> 
      <input type="password" class="form-control" id="inputPassword" placeholder="Password"> 
     </div> 
     </div> 
     <div class="form-group"> 
     <div class="col-lg-10 col-lg-offset-3"> 
      <button type="reset" class="btn btn-default">Reset </button> 
      <button type="submit" class="btn btn-primary">Login </button> 
     </div> 
     </div> 
    </fieldset> 
    </form> 
    </body> 
</html> 
+0

すべてのリンクの一番下にwon style.cssファイルを置く –

答えて

0

この

<head> 
 
    <meta charset="utf-8"> 
 
    <title>Users</title> 
 
    <link rel="stylesheet" href="bootstrap.css"> 
 
    <link rel="stylesheet" href="bootstrap.min.css"> 
 
    
 
    <!-- my style sheet --> 
 
    <link rel="stylesheet" href="style.css"> 
 
</head>

0

のようにそれを試してみてください。

この

は、私が使用していますテーマですfiedsetタグ:

<!DOCTYPE html> 
    <html> 
    <head> 
     <meta charset="utf-8"> 
     <link rel="stylesheet" href="style.css"> 
     <link rel="stylesheet" href="bootstrap.css"> 
    <link rel="stylesheet" href="bootstrap.min.css"> 
    <title>Users</title> 
</head> 
<body> 

    <form class="form-horizontal col-lg-7" style="border: 1px solid red;" action="/index.php"> 
    <div class="row"> 
      <div class="col-bs-6"> 
      <div class="well bs-component"> 
       <form class="form-horizontal"> 
    <fieldset> 
     <div class="form-group"> 
     <label for="inputUsername" class="col-lg-3 control-label">Username</label> 
     <div class="col-lg-3"> 
      <input type="text" class="form-control" id="inputUsername" placeholder="Enter Username"> 
     </div> 
     </div> 

     <div class="form-group"> 
     <label for="inputPassword" class="col-lg-3 control-label">Password</label> 
     <div class="col-lg-3"> 
      <input type="password" class="form-control" id="inputPassword" placeholder="Password"> 
     </div> 
     </div> 
     <div class="form-group"> 
     <div class="col-lg-10 col-lg-offset-3"> 
      <button type="reset" class="btn btn-default">Reset </button> 
      <button type="submit" class="btn btn-primary">Login </button> 
     </div> 
     </div> 
    </fieldset> 
    </div> 
    </div> 
    </div> 
    </form> 
    </body> 
</html> 
関連する問題