我是html / css的新手,我正在尝试创建一个直接的网页,这只是几个水平居中的图像,每个都在自己的行上。 我最终使用了Bootstrap的基本html模板,并且无法弄清楚下面的代码有什么问题。 我的图像卡在页面的左边缘。 我目前使用的唯一CSS是默认链接的:“css / bootstrap.min.css”
这就是我身上的所有内容:
<div class=“container-fluid”> <div class=“row”> <img src="..." class=“img-responsive center-block”> </div> <div class=“row”> <img src="..." class=“img-responsive center-block”> </div> </div>I'm new to html/css and am trying to make a straight-forward webpage, which is just several images centered horizontally, each on their own row. I ended up using Bootstrap's basic html template, and can't figure out what's wrong with the code below. My images are stuck on the left edge of the page. The only CSS I'm currently using is the default linked one: "css/bootstrap.min.css"
This is all that's currently in my body:
<div class=“container-fluid”> <div class=“row”> <img src="..." class=“img-responsive center-block”> </div> <div class=“row”> <img src="..." class=“img-responsive center-block”> </div> </div>最满意答案
您的引号(“”)似乎在您的img类中被破坏了。 不知道你实际使用了什么,但将它们改为正常的引号,它应该工作。
<div class="container-fluid"> <div class="row"> <img src="..." class="img-responsive center-block"> </div> <div class="row"> <img src="..." class="img-responsive center-block"> </div> </div>Your quotation marks ("") seem to be broken in your img's class. Don't know what your actually using but change them to normal quotation marks and it should work.
<div class="container-fluid"> <div class="row"> <img src="..." class="img-responsive center-block"> </div> <div class="row"> <img src="..." class="img-responsive center-block"> </div> </div>更多推荐
发布评论