html
1<!DOCTYPE html> 2<html lang="en"> 3<head> 4 <meta charset="utf-8"> 5 <meta name="viewport" content="width=device-width, initial-scale=1"> 6 <title>Complete Bootstrap 4 Website Layout</title> 7 <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"> 8 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> 9 <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script> 10 <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script> 11 <script src="https://use.fontawesome.com/releases/v5.0.8/js/all.js"></script> 12 <link href="style.css" rel="stylesheet"> 13</head> 14<body> 15 16<!-- Navigation --> 17<nav class="navbar navbar-expand-md navbar-light bg-light sticky-top"> 18 <div class="container-fluid"> 19 <a href="#" class="navbar-brand"><img src="img/logo.png" alt=""></a> 20 <button class="navbar-toggler" type="button" data-toggle="collapase" data-target="#navbarResponsive"> 21 <span class="navbar-toggler-icon"></span> 22 </button> 23 <div class="collapsa navbar-collapse" id="navbarResponsive"> 24 <ul class="navbar-nav ml-auto"> 25 <li class="nav-item"> 26 <a href="#" class="nav-link">Home</a> 27 </li> 28 <li class="nav-item"> 29 <a href="#" class="nav-link">About</a> 30 </li> 31 <li class="nav-item"> 32 <a href="#" class="nav-link">Services</a> 33 </li> 34 <li class="nav-item"> 35 <a href="#" class="nav-link">Team</a> 36 </li> 37 <li class="nav-item"> 38 <a href="#" class="nav-link">Connect</a> 39 </li> 40 </ul> 41 </div> 42 </div> 43</nav> 44 45<!--- Image Slider --> 46<div id="slides" class="carousel slide" data-ride="carousel"> 47 <ul class="carousel-indicators"> 48 <li data-target="#slides" data-slide-to="0" class="active"></li> 49 <li data-target="#slides" data-slide-to="1"></li> 50 <li data-target="#slides" data-slide-to="2"></li> 51 </ul> 52 <div class="carousel-inner"> 53 <div class="carousel-item"> 54 <img src="img/background.png" alt="背景画像1"> 55 <div class="carousel-caption"> 56 <h1 class="display-2">Bootstrap</h1> 57 <h3>Complete website Layout</h3> 58 </div> 59 </div> 60 <div class="carousel-item"> 61 <img src="img/background.png2" alt="背景画像2"> 62 </div> 63 <div class="carousel-item"> 64 <img src="img/background.png3" alt="背景画像3"> 65 </div> 66 </div> 67</div> 68 69<!--- Jumbotron --> 70 71 72<!--- Welcome Section --> 73 74 75<!--- Three Column Section --> 76 77 78<!--- Two Column Section --> 79 80 81<!--- Fixed background --> 82 83 84<!--- Emoji Section --> 85 86 87<!--- Meet the team --> 88 89 90<!--- Cards --> 91 92 93<!--- Two Column Section --> 94 95 96<!--- Connect --> 97 98 99<!--- Footer --> 100 101 102 103 104</body> 105</html> 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 <!--- Check out w3newbie Templates & Courses! --> 122<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> 123 <div style="float:left; max-width: 48%; margin: .5rem; padding: 0; border: .5rem solid #666;"> 124 <a href="https://w3newbie.com/templates/" target="_blank" style="z-index: 100; cursor: pointer!important;"><img src="https://www.w3newbie.com/wp-content/uploads/w3newbie-templates-zip.png" style="max-width: 100%; min-width: 100%;"></a> 125</div> 126 <div style="float:left; max-width: 48%; margin: .5rem; padding: 0; border: .5rem solid #666;"> 127 <a href="https://w3newbie.com/courses/" target="_blank" style="z-index: 100; cursor: pointer!important;"><img src="https://www.w3newbie.com/wp-content/uploads/w3newbie-courses-zip.png" style="max-width: 100%; min-width: 100%;"></a> 128</div> 129<br style="clear: both;"> 130<div style="max-width: 52%; margin: 2rem auto; padding: 0; border: .5rem solid #666;"> 131 <a href="https://w3newbie.com/hosting/" target="_blank" style="z-index: 100; cursor: pointer!important;"><img src="https://www.w3newbie.com/wp-content/uploads/web-hosting-zip.jpg" style="max-width: 100%; min-width: 100%;"></a> 132</div> 133 <!--- Check out w3newbie Templates & Courses! --> 134 135 136 137
●質問内容
<!--Image Slider-->のあたりに記述している画像が表示されません。原因が思いつく方は教えてくださると幸いです。
●試してみた事
・パスについてしらべた
・imgを消してみた
・altに文字を入れてみた
関係ない部分を削除して、不具合が再現する最小限のコードを特定してください。
回答3件
あなたの回答
tips
プレビュー