图像根本没有显示

时间:2017-07-31 21:08:03

标签: html css image css3 bootstrap-4

Img标签由于某种原因无法正常工作。任何人都可以建议我吗?我使用bootstrap

 <div id="header" class="header">
        <div class="container">
            <div class="row">
                <div class="col-lg-6 col-md-6">
                    <h1>Responsive Web design</h1>
                    <p> Hello</p>
                    <button type="button" class="btn btn-lg btn-primary">Buy Mow</button>
                    <button type="button" class="btn btn-lg btm-success">View Details</button>
                </div>
                <div class="col-lg-6 col-md-6">
            <img src=img/a.jpg"  alt="1"> 
                </div>

            </div>

        </div>
    </div>

3 个答案:

答案 0 :(得分:1)

你确定语法好吗?

 <img src=img/a.jpg"  alt="1"> 

src之后的"在哪里?

<img src="img/a.jpg"  alt="1"> 

答案 1 :(得分:1)

请务必关闭引号

 <div class="col-lg-6 col-md-6">
    <img src="img/a.jpg"  alt="1"> 
 </div>

答案 2 :(得分:0)

用以下代码替换您的代码:

 <div id="header" class="header">
        <div class="container">
            <div class="row">
                <div class="col-lg-6 col-md-6">
                    <h1>Responsive Web design</h1>
                    <p> Hello</p>
                    <button type="button" class="btn btn-lg btn-primary">Buy Mow</button>
                    <button type="button" class="btn btn-lg btm-success">View Details</button>
                </div>
                <div class="col-lg-6 col-md-6">
            <img src="img/a.jpg"  alt="1"> 
                </div>

            </div>

        </div>
    </div>